HHH-8923 corrected test case

This commit is contained in:
Brett Meyer 2014-03-26 10:26:25 -04:00
parent 2464d2e214
commit f95dfddd8c
1 changed files with 3 additions and 4 deletions

View File

@ -119,12 +119,11 @@ public class JndiRegionFactoryTestCase extends SingleNodeTestCase {
@Test @Test
public void testRedeployment() throws Exception { public void testRedeployment() throws Exception {
addEntityCheckCache( sessionFactory() ); addEntityCheckCache( sessionFactory() );
sessionFactory().close();
bindToJndi = false; bindToJndi = false;
rebuildSessionFactory();
SessionFactoryImplementor sessionFactory = (SessionFactoryImplementor) configuration().buildSessionFactory( serviceRegistry() ); addEntityCheckCache( sessionFactory() );
addEntityCheckCache( sessionFactory ); JndiInfinispanRegionFactory regionFactory = (JndiInfinispanRegionFactory) sessionFactory().getSettings().getRegionFactory();
JndiInfinispanRegionFactory regionFactory = (JndiInfinispanRegionFactory) sessionFactory.getSettings().getRegionFactory();
Cache cache = regionFactory.getCacheManager().getCache( "org.hibernate.test.cache.infinispan.functional.Item" ); Cache cache = regionFactory.getCacheManager().getCache( "org.hibernate.test.cache.infinispan.functional.Item" );
assertEquals( ComponentStatus.RUNNING, cache.getStatus() ); assertEquals( ComponentStatus.RUNNING, cache.getStatus() );
} }