File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
hibernate-core/src/test/java/org/hibernate/test/boot/cfgXml Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 8
8
9
9
import org .hibernate .boot .registry .StandardServiceRegistry ;
10
10
import org .hibernate .boot .registry .StandardServiceRegistryBuilder ;
11
+ import org .hibernate .engine .config .spi .ConfigurationService ;
11
12
import org .hibernate .internal .util .config .ConfigurationException ;
12
13
13
14
import org .hibernate .testing .junit4 .BaseUnitTestCase ;
14
15
import org .junit .Test ;
15
16
17
+ import static org .junit .Assert .assertNotNull ;
16
18
import static org .junit .Assert .fail ;
17
19
18
20
/**
@@ -24,7 +26,16 @@ public void testCfgXmlWithSchemaLocation() {
24
26
StandardServiceRegistry ssr = new StandardServiceRegistryBuilder ()
25
27
.configure ( "org/hibernate/test/boot/cfgXml/hibernate.cfg.xml" )
26
28
.build ();
27
- StandardServiceRegistryBuilder .destroy ( ssr );
29
+ try {
30
+ final ConfigurationService cs = ssr .getService ( ConfigurationService .class );
31
+ // augmented form
32
+ assertNotNull ( cs .getSettings ().get ( "hibernate.cache.provider_class" ) );
33
+ // original form
34
+ assertNotNull ( cs .getSettings ().get ( "cache.provider_class" ) );
35
+ }
36
+ finally {
37
+ StandardServiceRegistryBuilder .destroy ( ssr );
38
+ }
28
39
}
29
40
30
41
@ Test (expected = ConfigurationException .class )
You can’t perform that action at this time.
0 commit comments