[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/api ...
Manik Surtani
msurtani at jboss.com
Tue Jan 2 13:26:05 EST 2007
User: msurtani
Date: 07/01/02 13:26:05
Modified: tests/functional/org/jboss/cache/api
SyncReplTxTest.java CacheSPITest.java
NodeAPITest.java NodeReplicatedMoveTest.java
SyncReplTest.java CacheAPITest.java
NodeMoveAPITest.java
Log:
Cleaned up cache factory
Revision Changes Path
1.4 +2 -2 JBossCache/tests/functional/org/jboss/cache/api/SyncReplTxTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SyncReplTxTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/SyncReplTxTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- SyncReplTxTest.java 30 Dec 2006 17:49:53 -0000 1.3
+++ SyncReplTxTest.java 2 Jan 2007 18:26:05 -0000 1.4
@@ -36,8 +36,8 @@
{
System.out.println("*** In setUp()");
caches = new Cache[2];
- caches[0] = DefaultCacheFactory.createCache("META-INF/replSync-service.xml");
- caches[1] = DefaultCacheFactory.createCache("META-INF/replSync-service.xml");
+ caches[0] = DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml");
+ caches[1] = DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml");
TestingUtil.blockUntilViewsReceived(caches, 5000);
System.out.println("*** Finished setUp()");
1.3 +23 -24 JBossCache/tests/functional/org/jboss/cache/api/CacheSPITest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheSPITest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/CacheSPITest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- CacheSPITest.java 6 Nov 2006 21:14:47 -0000 1.2
+++ CacheSPITest.java 2 Jan 2007 18:26:05 -0000 1.3
@@ -1,14 +1,12 @@
-
package org.jboss.cache.api;
-import java.util.List;
-
+import junit.framework.TestCase;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.DefaultCacheFactory;
import org.jboss.cache.factories.XmlConfigurationParser;
-import junit.framework.TestCase;
+import java.util.List;
public class CacheSPITest extends TestCase
{
@@ -24,8 +22,8 @@
Configuration conf2 = parser.parseFile("META-INF/replSync-service.xml");
- cache1 = (CacheSPI) DefaultCacheFactory.createCache(conf1, false);
- cache2 = (CacheSPI) DefaultCacheFactory.createCache(conf2, false);
+ cache1 = (CacheSPI) DefaultCacheFactory.getInstance().createCache(conf1, false);
+ cache2 = (CacheSPI) DefaultCacheFactory.getInstance().createCache(conf2, false);
}
protected void tearDown() throws Exception
@@ -50,6 +48,7 @@
catch (Exception e) {}
}
}
+
public void testGetMembers() throws Exception
{
@@ -78,8 +77,8 @@
Configuration conf2 = parser.parseFile("META-INF/replSync-service.xml");
- CacheSPI cache1 = (CacheSPI) DefaultCacheFactory.createCache(conf1, false);
- CacheSPI cache2 = (CacheSPI) DefaultCacheFactory.createCache(conf2, false);
+ CacheSPI cache1 = (CacheSPI) DefaultCacheFactory.getInstance().createCache(conf1, false);
+ CacheSPI cache2 = (CacheSPI) DefaultCacheFactory.getInstance().createCache(conf2, false);
cache1.start();
assertTrue("Cache1 is coordinator", cache1.getRPCManager().isCoordinator());
1.11 +1 -1 JBossCache/tests/functional/org/jboss/cache/api/NodeAPITest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeAPITest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/NodeAPITest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- NodeAPITest.java 2 Jan 2007 14:15:32 -0000 1.10
+++ NodeAPITest.java 2 Jan 2007 18:26:05 -0000 1.11
@@ -29,7 +29,7 @@
protected void setUp()
{
// start a single cache instance
- cache = (CacheImpl) DefaultCacheFactory.createCache("META-INF/local-tx-service.xml");
+ cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache("META-INF/local-tx-service.xml");
rootNode = cache.getRoot();
tm = cache.getTransactionManager();
}
1.9 +2 -2 JBossCache/tests/functional/org/jboss/cache/api/NodeReplicatedMoveTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeReplicatedMoveTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/NodeReplicatedMoveTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- NodeReplicatedMoveTest.java 2 Jan 2007 14:37:14 -0000 1.8
+++ NodeReplicatedMoveTest.java 2 Jan 2007 18:26:05 -0000 1.9
@@ -31,14 +31,14 @@
cache = new CacheSPI[2];
// start a single cache instance
- cache[0] = (CacheSPI) DefaultCacheFactory.createCache("META-INF/replSync-service.xml", false);
+ cache[0] = (CacheSPI) DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml", false);
cache[0].getConfiguration().setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
cache[0].start();
rootNode = cache[0].getRoot();
tm = cache[0].getTransactionManager();
// start second instance
- cache[1] = (CacheSPI) DefaultCacheFactory.createCache("META-INF/replSync-service.xml", false);
+ cache[1] = (CacheSPI) DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml", false);
cache[1].getConfiguration().setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
cache[1].start();
}
1.8 +2 -2 JBossCache/tests/functional/org/jboss/cache/api/SyncReplTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SyncReplTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/SyncReplTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- SyncReplTest.java 31 Dec 2006 03:01:20 -0000 1.7
+++ SyncReplTest.java 2 Jan 2007 18:26:05 -0000 1.8
@@ -31,8 +31,8 @@
{
System.out.println("*** In setUp()");
caches = new CacheSPI[2];
- caches[0] = (CacheSPI) DefaultCacheFactory.createCache("META-INF/replSync-service.xml");
- caches[1] = (CacheSPI) DefaultCacheFactory.createCache("META-INF/replSync-service.xml");
+ caches[0] = (CacheSPI) DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml");
+ caches[1] = (CacheSPI) DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml");
TestingUtil.blockUntilViewsReceived(caches, 5000);
System.out.println("*** Finished setUp()");
1.8 +1 -1 JBossCache/tests/functional/org/jboss/cache/api/CacheAPITest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheAPITest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/CacheAPITest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- CacheAPITest.java 30 Dec 2006 17:49:53 -0000 1.7
+++ CacheAPITest.java 2 Jan 2007 18:26:05 -0000 1.8
@@ -30,7 +30,7 @@
protected void setUp()
{
// start a single cache instance
- cache = DefaultCacheFactory.createCache("META-INF/local-tx-service.xml");
+ cache = DefaultCacheFactory.getInstance().createCache("META-INF/local-tx-service.xml");
}
protected void tearDown()
1.19 +1 -1 JBossCache/tests/functional/org/jboss/cache/api/NodeMoveAPITest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeMoveAPITest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/NodeMoveAPITest.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- NodeMoveAPITest.java 2 Jan 2007 17:15:31 -0000 1.18
+++ NodeMoveAPITest.java 2 Jan 2007 18:26:05 -0000 1.19
@@ -35,7 +35,7 @@
protected void setUp() throws Exception
{
// start a single cache instance
- cache = (CacheImpl) DefaultCacheFactory.createCache("META-INF/local-tx-service.xml", false);
+ cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache("META-INF/local-tx-service.xml", false);
cache.getConfiguration().setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
cache.start();
rootNode = cache.getRoot();
More information about the jboss-cvs-commits
mailing list