HHH-10119 - Config setting names loaded from cfg.xml stored in augmented (prefixed with "hibernate.") form but not original form
This commit is contained in:
parent
0c628fa9aa
commit
0f5139b60a
|
@ -8,11 +8,13 @@ package org.hibernate.test.boot.cfgXml;
|
|||
|
||||
import org.hibernate.boot.registry.StandardServiceRegistry;
|
||||
import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
|
||||
import org.hibernate.engine.config.spi.ConfigurationService;
|
||||
import org.hibernate.internal.util.config.ConfigurationException;
|
||||
|
||||
import org.hibernate.testing.junit4.BaseUnitTestCase;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
/**
|
||||
|
@ -24,7 +26,16 @@ public class CfgXmlParsingTest extends BaseUnitTestCase {
|
|||
StandardServiceRegistry ssr = new StandardServiceRegistryBuilder()
|
||||
.configure( "org/hibernate/test/boot/cfgXml/hibernate.cfg.xml" )
|
||||
.build();
|
||||
StandardServiceRegistryBuilder.destroy( ssr );
|
||||
try {
|
||||
final ConfigurationService cs = ssr.getService( ConfigurationService.class );
|
||||
// augmented form
|
||||
assertNotNull( cs.getSettings().get( "hibernate.cache.provider_class" ) );
|
||||
// original form
|
||||
assertNotNull( cs.getSettings().get( "cache.provider_class" ) );
|
||||
}
|
||||
finally {
|
||||
StandardServiceRegistryBuilder.destroy( ssr );
|
||||
}
|
||||
}
|
||||
|
||||
@Test(expected = ConfigurationException.class )
|
||||
|
|
Loading…
Reference in New Issue