HHH-8923 corrected test case

This commit is contained in:
Brett Meyer 2014-03-26 10:26:25 -04:00
parent 2c88c3998b
commit 96b9366f14
1 changed files with 3 additions and 4 deletions

View File

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