[jbosscache-commits] JBoss Cache SVN: r7452 - in core/trunk/src/test/java/org/jboss/cache: notifications and 1 other directory.
jbosscache-commits at lists.jboss.org
jbosscache-commits at lists.jboss.org
Mon Jan 12 06:53:00 EST 2009
Author: mircea.markus
Date: 2009-01-12 06:52:58 -0500 (Mon, 12 Jan 2009)
New Revision: 7452
Modified:
core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithRollbackTest.java
core/trunk/src/test/java/org/jboss/cache/loader/RootChildrenLoadedTest.java
core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java
core/trunk/src/test/java/org/jboss/cache/notifications/CacheListenerRemovalTest.java
Log:
removed unused import DefaultCacheFactory
Modified: core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithRollbackTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithRollbackTest.java 2009-01-12 11:38:59 UTC (rev 7451)
+++ core/trunk/src/test/java/org/jboss/cache/loader/CacheLoaderWithRollbackTest.java 2009-01-12 11:52:58 UTC (rev 7452)
@@ -1,8 +1,8 @@
package org.jboss.cache.loader;
import org.jboss.cache.Cache;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.UnitTestCacheFactory;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.UnitTestConfigurationFactory;
@@ -16,7 +16,7 @@
@Test(groups = "functional", testName = "loader.CacheLoaderWithRollbackTest")
public class CacheLoaderWithRollbackTest
{
- final Fqn fqn = Fqn.fromString("/a/b");
+ final Fqn<String> fqn = Fqn.fromString("/a/b");
final String key = "key";
protected Configuration.NodeLockingScheme getNodeLockingScheme()
@@ -32,7 +32,7 @@
cfg.setNodeLockingScheme(getNodeLockingScheme());
cfg.setCacheLoaderConfig(cacheLoaderConfig);
cfg.getRuntimeConfig().setTransactionManager(new DummyTransactionManager());
- Cache<String, String> cache = new DefaultCacheFactory<String, String>().createCache(cfg);
+ Cache<String, String> cache = new UnitTestCacheFactory().createCache(cfg, getClass());
cache.put(fqn, key, "value");
// evict the node, so we have to go to the loader to do anything with it
Modified: core/trunk/src/test/java/org/jboss/cache/loader/RootChildrenLoadedTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/RootChildrenLoadedTest.java 2009-01-12 11:38:59 UTC (rev 7451)
+++ core/trunk/src/test/java/org/jboss/cache/loader/RootChildrenLoadedTest.java 2009-01-12 11:52:58 UTC (rev 7452)
@@ -1,8 +1,8 @@
package org.jboss.cache.loader;
import org.jboss.cache.Cache;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.UnitTestCacheFactory;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.UnitTestConfigurationFactory;
@@ -12,7 +12,7 @@
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
- at Test(groups = "functional", enabled = true)
+ at Test(groups = "functional", testName = "loader.RootChildrenLoadedTest")
public class RootChildrenLoadedTest
{
Cache<String, String> cache;
@@ -27,7 +27,7 @@
cacheLoaderConfig.getFirstCacheLoaderConfig().setCacheLoader(new DummyInMemoryCacheLoader());
Configuration cfg = new Configuration();
cfg.setCacheLoaderConfig(cacheLoaderConfig);
- cache = new DefaultCacheFactory<String, String>().createCache(cfg);
+ cache = new UnitTestCacheFactory().createCache(cfg, getClass());
cache.put(fqn, key, "value");
// flush the cache and start with totally clean state
Modified: core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java 2009-01-12 11:38:59 UTC (rev 7451)
+++ core/trunk/src/test/java/org/jboss/cache/loader/TcpCacheLoaderTest.java 2009-01-12 11:52:58 UTC (rev 7452)
@@ -2,7 +2,7 @@
import org.jboss.cache.CacheException;
import org.jboss.cache.CacheSPI;
-import org.jboss.cache.DefaultCacheFactory;
+import org.jboss.cache.UnitTestCacheFactory;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.UnitTestConfigurationFactory;
@@ -19,11 +19,7 @@
import org.testng.annotations.Test;
import javax.transaction.Synchronization;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
+import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -67,7 +63,7 @@
Configuration config = UnitTestConfigurationFactory.createConfiguration(Configuration.CacheMode.LOCAL, true);
// disable eviction!!
config.setEvictionConfig(null);
- CacheSPI cache = (CacheSPI) new DefaultCacheFactory<Object, Object>().createCache(config);
+ CacheSPI cache = (CacheSPI) new UnitTestCacheFactory<Object, Object>().createCache(config, getClass());
cacheServer.setCache(cache);
cacheServer.create();
cacheServer.start();
Modified: core/trunk/src/test/java/org/jboss/cache/notifications/CacheListenerRemovalTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/notifications/CacheListenerRemovalTest.java 2009-01-12 11:38:59 UTC (rev 7451)
+++ core/trunk/src/test/java/org/jboss/cache/notifications/CacheListenerRemovalTest.java 2009-01-12 11:52:58 UTC (rev 7452)
@@ -1,8 +1,8 @@
package org.jboss.cache.notifications;
import org.jboss.cache.Cache;
-import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.Fqn;
+import org.jboss.cache.UnitTestCacheFactory;
import org.jboss.cache.notifications.annotation.CacheListener;
import org.jboss.cache.notifications.annotation.NodeVisited;
import org.jboss.cache.notifications.event.Event;
@@ -13,12 +13,12 @@
/**
* @author Manik Surtani
*/
- at Test(groups = "functional")
+ at Test(groups = "functional", testName = "notifications.CacheListenerRemovalTest")
public class CacheListenerRemovalTest
{
public void testListenerRemoval()
{
- Cache cache = new DefaultCacheFactory().createCache();
+ Cache cache = new UnitTestCacheFactory().createCache(getClass());
AtomicInteger i = new AtomicInteger(0);
try
{
More information about the jbosscache-commits
mailing list