This is an automated email from the ASF dual-hosted git repository.
borinquenkid pushed a commit to branch 8.0.x-hibernate7
in repository https://gitbox.apache.org/repos/asf/grails-core.git
The following commit(s) were added to refs/heads/8.0.x-hibernate7 by this push:
new 26b012fe5a Fix review comments: H7 cache factory class, remove unused
GormEnhancer import, improve HibernateGormDatastoreSpec javadoc
26b012fe5a is described below
commit 26b012fe5a43450b5d784b9c6a2ee7e50e872a4e
Author: Walter Duque de Estrada <[email protected]>
AuthorDate: Thu Jun 18 22:17:20 2026 -0500
Fix review comments: H7 cache factory class, remove unused GormEnhancer
import, improve HibernateGormDatastoreSpec javadoc
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
---
.../grails/gorm/tests/HibernateGormDatastoreSpec.groovy | 11 +++++------
.../org/grails/orm/hibernate/HibernateGormEnhancerSpec.groovy | 1 -
.../connections/HibernateConnectionSourceSettingsSpec.groovy | 6 +++---
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git
a/grails-data-hibernate7/core/src/test/groovy/grails/gorm/tests/HibernateGormDatastoreSpec.groovy
b/grails-data-hibernate7/core/src/test/groovy/grails/gorm/tests/HibernateGormDatastoreSpec.groovy
index 4b5ece1283..c99bb40fe8 100644
---
a/grails-data-hibernate7/core/src/test/groovy/grails/gorm/tests/HibernateGormDatastoreSpec.groovy
+++
b/grails-data-hibernate7/core/src/test/groovy/grails/gorm/tests/HibernateGormDatastoreSpec.groovy
@@ -43,12 +43,11 @@ import org.hibernate.service.spi.ServiceRegistryImplementor
import org.hibernate.boot.spi.AdditionalMappingContributor
/**
- * The original GormDataStoreSpec destroyed the setup
- * between tests instead of at the end of all tests
- * It also was default configured for H2 which
- * made it break with some Java types.
- * Finally, it loaded all the test Entities,
- * now it can be setup individually.
+ * Base Spock spec for Hibernate 7 GORM tests.
+ *
+ * Manages a shared {@link org.grails.orm.hibernate.HibernateDatastore} over
an in-memory
+ * H2 database using the TCK lifecycle. Subclasses register only the domain
classes they
+ * need via {@code setupSpec}, keeping tests isolated and the schema minimal.
*/
class HibernateGormDatastoreSpec extends
GrailsDataTckSpec<GrailsDataHibernate7TckManager> {
diff --git
a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateGormEnhancerSpec.groovy
b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateGormEnhancerSpec.groovy
index cc7f463c0d..b7b35502ac 100644
---
a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateGormEnhancerSpec.groovy
+++
b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/HibernateGormEnhancerSpec.groovy
@@ -20,7 +20,6 @@ package org.grails.orm.hibernate
import grails.gorm.annotation.Entity
import grails.gorm.tests.HibernateGormDatastoreSpec
-import org.grails.datastore.gorm.GormEnhancer
import org.grails.datastore.mapping.core.connections.ConnectionSource
class HibernateGormEnhancerSpec extends HibernateGormDatastoreSpec {
diff --git
a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/connections/HibernateConnectionSourceSettingsSpec.groovy
b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/connections/HibernateConnectionSourceSettingsSpec.groovy
index dd4582baa1..27dd7e9ff8 100644
---
a/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/connections/HibernateConnectionSourceSettingsSpec.groovy
+++
b/grails-data-hibernate7/core/src/test/groovy/org/grails/orm/hibernate/connections/HibernateConnectionSourceSettingsSpec.groovy
@@ -37,7 +37,7 @@ class HibernateConnectionSourceSettingsSpec extends
Specification {
'hibernate.flush.mode': 'commit',
'hibernate.cache.queries': 'true',
'hibernate.hbm2ddl.auto': 'create',
-
'hibernate.cache':['region.factory_class':'org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory'],
+
'hibernate.cache':['region.factory_class':'org.hibernate.cache.jcache.internal.JCacheRegionFactory'],
'hibernate.configLocations':'file:hibernate.cfg.xml',
'hibernate.jpa.compliance.cascade': 'true',
]
@@ -59,7 +59,7 @@ class HibernateConnectionSourceSettingsSpec extends
Specification {
expectedHibernateProperties.put('hibernate.configLocations','file:hibernate.cfg.xml')
expectedHibernateProperties.put('hibernate.use_query_cache','true')
expectedHibernateProperties.put("hibernate.connection.handling_mode",
"DELAYED_ACQUISITION_AND_HOLD")
-
expectedHibernateProperties.put('hibernate.cache.region.factory_class','org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory')
+
expectedHibernateProperties.put('hibernate.cache.region.factory_class','org.hibernate.cache.jcache.internal.JCacheRegionFactory')
expectedHibernateProperties.put('hibernate.jpa.compliance.cascade',
'true')
then:"The results are correct"
@@ -84,7 +84,7 @@ class HibernateConnectionSourceSettingsSpec extends
Specification {
hibernateProperties['hibernate.configLocations'] ==
'file:hibernate.cfg.xml'
hibernateProperties['hibernate.use_query_cache'] == 'true'
hibernateProperties["hibernate.connection.handling_mode"] ==
"DELAYED_ACQUISITION_AND_HOLD"
- hibernateProperties['hibernate.cache.region.factory_class'] ==
'org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory'
+ hibernateProperties['hibernate.cache.region.factory_class'] ==
'org.hibernate.cache.jcache.internal.JCacheRegionFactory'
hibernateProperties['hibernate.jpa.compliance.cascade'] == 'true'
}