Author: mircea.markus
Date: 2008-12-12 04:49:01 -0500 (Fri, 12 Dec 2008)
New Revision: 7314
Modified:
core/trunk/src/test/java/org/jboss/cache/eviction/EvictionConfigurationTest.java
Log:
no need to create a JChannel for local caches
Modified:
core/trunk/src/test/java/org/jboss/cache/eviction/EvictionConfigurationTest.java
===================================================================
---
core/trunk/src/test/java/org/jboss/cache/eviction/EvictionConfigurationTest.java 2008-12-12
09:42:15 UTC (rev 7313)
+++
core/trunk/src/test/java/org/jboss/cache/eviction/EvictionConfigurationTest.java 2008-12-12
09:49:01 UTC (rev 7314)
@@ -6,12 +6,9 @@
*/
package org.jboss.cache.eviction;
-import org.jboss.cache.CacheSPI;
-import org.jboss.cache.Fqn;
-import org.jboss.cache.Region;
-import org.jboss.cache.RegionManager;
-import org.jboss.cache.UnitTestCacheFactory;
+import org.jboss.cache.*;
import org.jboss.cache.config.EvictionRegionConfig;
+import org.jboss.cache.config.Configuration;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.util.TestingUtil;
import static org.testng.AssertJUnit.assertEquals;
@@ -208,10 +205,11 @@
private CacheSPI<Object, Object> setupCache(String configurationName)
{
- CacheSPI<Object, Object> cache = (CacheSPI<Object, Object>) new
UnitTestCacheFactory<Object, Object>().createCache(configurationName, false,
getClass());
-
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
- cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
- cache.start();
- return cache;
+ UnitTestCacheFactory<Object, Object> testCacheFactory = new
UnitTestCacheFactory<Object, Object>();
+ Configuration config =
testCacheFactory.getConfigurationFromFile(configurationName);
+ config.setCacheMode(Configuration.CacheMode.LOCAL);
+
config.setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
+ config.setIsolationLevel(IsolationLevel.SERIALIZABLE);
+ return (CacheSPI<Object, Object>) testCacheFactory.createCache(config,
getClass());
}
}
Show replies by date