Commit 637da9c
committed
test(hibernate7): register domain classes in the two specs the TCK API now requires
Completes the PR-C mirror. The merged GrailsDataTckManager makes domainClasses a
private set with an empty default, so every spec must register the classes it
uses via registerDomainClasses(...). The earlier mirror migrated the 27 specs
using manager.domainClasses.addAll([...]), but two specs used other patterns and
were missed - the full pre-PR test run surfaced them:
- HibernateOptimisticLockingSpec had no setupSpec (it relied on the old manager's
non-empty default set). Added setupSpec registering OptLockVersioned and
OptLockNotVersioned, matching Hibernate5OptimisticLockingSpec.
- HibernateValidationSpec used `manager.domainClasses += [...]` (compound-assign,
now a ReadOnlyPropertyException). Switched to registerDomainClasses(...) with
the full class list (TestEntity, ChildEntity included, since the default is
empty), matching the hibernate5 HibernateValidationSpec.
Verified: ./gradlew :grails-data-hibernate7-core:test now passes
(571 tests, 0 failures, 26 skipped); all four violation reports are clean.
Assisted-by: claude-code:claude-opus-4-81 parent 7931bc7 commit 637da9c
2 files changed
Lines changed: 6 additions & 2 deletions
File tree
- grails-data-hibernate7/core/src/test/groovy/grails/gorm/tests
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
| 35 | + | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
0 commit comments