borinquenkid opened a new pull request, #15790:
URL: https://github.com/apache/grails-core/pull/15790
## What
Adds the net-new **unit-test coverage for the GormRegistry O(M+N) rewrite's
core classes** that
the core-impl branch (#15780) was missing. Tests-only — **no production code
is touched**.
Stacked on #15780 (`feat/gorm-registry-core-impl`), so the diff here is just
the new specs.
## Coverage added (23 specs)
- **`GormApiResolver`** and the four datastore selectors —
`PreferredDatastoreSelector`,
`QualifiedDatastoreSelector`, `ActiveSessionDatastoreSelector`,
`DefaultDatastoreSelector`
- **`GormRegistry`** — concurrency, entity registration, factory lookup
- **API registries** — `AbstractGormApiRegistry`, `GormStaticApiRegistry`,
`GormInstanceApiRegistry`,
`GormValidationApiRegistry`, `GormApiRegistry`, plus `GormInstanceApi`
- **`GormApiFactory` SPI** — `DefaultGormApiFactory`, `GormApiFactory`
- **Multi-tenancy core** — `CurrentTenantHolder`, `Tenants`, the
`@CurrentTenant` transform
(`MultiTenantCurrentTenantTransformSpec`), `MultiTenantEventListener`
- **Misc** — `ConnectionSourceNameResolver`,
`DefaultTransactionTemplateFactory`, a service-transform spec
## Notes
All 23 specs pass against core-impl's implementation
(`:grails-datamapping-core:test`, 0 failures; codeStyle clean).
Two adjustments from the originally-drafted specs:
- `ServiceTransformSpec`: aligned the no-datastore exception assertion to
core-impl's actual message
(`"No GORM implementations configured"`, thrown by
`GormApiResolver.findSingleDatastore`).
- Dropped `TenantContextProfilingSpec`: a timing micro-benchmark (prints
durations, asserts only `true`) —
brittle/non-deterministic and not portable unit coverage.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]