This is an automated email from the ASF dual-hosted git repository. borinquenkid pushed a commit to branch merge-hibernate6 in repository https://gitbox.apache.org/repos/asf/grails-core.git
commit cc92f408f5651d0083a45227ee7b1da6ffbb0d0d Author: Walter Duque de Estrada <[email protected]> AuthorDate: Thu Sep 25 19:37:46 2025 -0500 Update test --- .../HibernateConnectionSourceSettingsSpec.groovy | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/grails-data-hibernate6/core/src/test/groovy/org/grails/orm/hibernate/connections/HibernateConnectionSourceSettingsSpec.groovy b/grails-data-hibernate6/core/src/test/groovy/org/grails/orm/hibernate/connections/HibernateConnectionSourceSettingsSpec.groovy index 9612944488..443f208ac5 100644 --- a/grails-data-hibernate6/core/src/test/groovy/org/grails/orm/hibernate/connections/HibernateConnectionSourceSettingsSpec.groovy +++ b/grails-data-hibernate6/core/src/test/groovy/org/grails/orm/hibernate/connections/HibernateConnectionSourceSettingsSpec.groovy @@ -54,18 +54,13 @@ class HibernateConnectionSourceSettingsSpec extends Specification { expectedHibernateProperties.put('hibernate.hbm2ddl.auto', 'create') expectedHibernateProperties.put('hibernate.cache.queries', 'true') expectedHibernateProperties.put('hibernate.flush.mode', 'commit') - expectedHibernateProperties.put('hibernate.naming_strategy','org.hibernate.cfg.ImprovedNamingStrategy') + expectedHibernateProperties.put('hibernate.naming_strategy','org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy') expectedHibernateProperties.put('hibernate.entity_dirtiness_strategy', 'org.grails.orm.hibernate.dirty.GrailsEntityDirtinessStrategy') 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.jpa.compliance.cascade', 'true') - expectedHibernateProperties.put('org.hibernate.foo','bar') - - def expectedCombinedProperties = new Properties() - expectedCombinedProperties.putAll(expectedDataSourceProperties) - expectedCombinedProperties.putAll(expectedHibernateProperties) then:"The results are correct" settings.dataSource.dbCreate == 'update' @@ -79,6 +74,17 @@ class HibernateConnectionSourceSettingsSpec extends Specification { settings.hibernate.get('hbm2ddl.auto') == 'create' settings.hibernate.getConfigLocations().size() == 1 settings.hibernate.getConfigLocations()[0] instanceof UrlResource - settings.hibernate.toProperties() == expectedHibernateProperties + + def hibernateProperties = settings.hibernate.toProperties() + hibernateProperties['hibernate.hbm2ddl.auto'] == 'create' + hibernateProperties['hibernate.cache.queries'] == 'true' + hibernateProperties['hibernate.flush.mode'] == 'commit' + hibernateProperties['hibernate.naming_strategy'] == 'org.hibernate.boot.model.naming.CamelCaseToUnderscoresNamingStrategy' + hibernateProperties['hibernate.entity_dirtiness_strategy'] == 'org.grails.orm.hibernate.dirty.GrailsEntityDirtinessStrategy' + 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.jpa.compliance.cascade'] == 'true' } }
