diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/BasicJdbcTransactionalTestCase.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/BasicJdbcTransactionalTestCase.java index 50a5a25154..2a2da42ca1 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/BasicJdbcTransactionalTestCase.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/BasicJdbcTransactionalTestCase.java @@ -121,7 +121,7 @@ public class BasicJdbcTransactionalTestCase extends SingleNodeTestCase { @Test public void testEmptySecondLevelCacheEntry() throws Exception { - sessionFactory().getCache().evictEntityRegion( Item.class.getName() ); + sessionFactory().getCache().evictCollectionRegion( Item.class.getName() + ".items" ); Statistics stats = sessionFactory().getStatistics(); stats.clear(); SecondLevelCacheStatistics statistics = stats.getSecondLevelCacheStatistics( Item.class.getName() + ".items" ); diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/BasicTransactionalTestCase.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/BasicTransactionalTestCase.java index 4cbcaa8204..c2ca0f0b06 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/BasicTransactionalTestCase.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/BasicTransactionalTestCase.java @@ -433,7 +433,7 @@ public class BasicTransactionalTestCase extends SingleNodeTestCase { @Test public void testEmptySecondLevelCacheEntry() throws Exception { - sessionFactory().getCache().evictEntityRegion( Item.class.getName() ); + sessionFactory().getCache().evictCollectionRegion( Item.class.getName() + ".items" ); Statistics stats = sessionFactory().getStatistics(); stats.clear(); SecondLevelCacheStatistics statistics = stats.getSecondLevelCacheStatistics( Item.class.getName() + ".items" ); diff --git a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/classloader/IsolatedClassLoaderTest.java b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/classloader/IsolatedClassLoaderTest.java index 5d0d4fdc0f..7ca9ae7598 100644 --- a/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/classloader/IsolatedClassLoaderTest.java +++ b/hibernate-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/classloader/IsolatedClassLoaderTest.java @@ -25,6 +25,7 @@ package org.hibernate.test.cache.infinispan.functional.classloader; import javax.transaction.TransactionManager; +import org.hibernate.test.cache.infinispan.functional.Item; import org.infinispan.Cache; import org.infinispan.manager.CacheContainer; import org.infinispan.manager.EmbeddedCacheManager; @@ -116,6 +117,8 @@ public class IsolatedClassLoaderTest extends DualNodeTestCase { @Override protected void cleanupTest() throws Exception { try { + // Clear the local account cache + sessionFactory().getCache().evictEntityRegion(Account.class.getName()); if ( localQueryCache != null && localQueryListener != null ) { localQueryCache.removeListener( localQueryListener ); }