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