[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/api ...
Vladmir Blagojevic
vladimir.blagojevic at jboss.com
Wed Jan 10 10:29:10 EST 2007
User: vblagojevic
Date: 07/01/10 10:29:10
Modified: tests/functional/org/jboss/cache/api SyncReplTest.java
NodeReplicatedMoveTest.java CacheSPITest.java
SyncReplTxTest.java
Log:
JBCACHE-840 (work in progress)
Revision Changes Path
1.9 +4 -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.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- SyncReplTest.java 2 Jan 2007 18:26:05 -0000 1.8
+++ SyncReplTest.java 10 Jan 2007 15:29:10 -0000 1.9
@@ -14,7 +14,9 @@
import org.jboss.cache.InvocationContext;
import org.jboss.cache.Node;
import org.jboss.cache.config.Option;
+import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.DefaultCacheFactory;
+import org.jboss.cache.factories.UnitTestCacheFactory;
import org.jboss.cache.misc.TestingUtil;
import java.util.HashMap;
@@ -31,8 +33,8 @@
{
System.out.println("*** In setUp()");
caches = new CacheSPI[2];
- caches[0] = (CacheSPI) DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml");
- caches[1] = (CacheSPI) DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml");
+ caches[0] = (CacheSPI) DefaultCacheFactory.getInstance().createCache(UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC));
+ caches[1] = (CacheSPI) DefaultCacheFactory.getInstance().createCache(UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC));
TestingUtil.blockUntilViewsReceived(caches, 5000);
System.out.println("*** Finished setUp()");
1.10 +5 -3 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.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- NodeReplicatedMoveTest.java 2 Jan 2007 18:26:05 -0000 1.9
+++ NodeReplicatedMoveTest.java 10 Jan 2007 15:29:10 -0000 1.10
@@ -11,7 +11,9 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.DefaultCacheFactory;
+import org.jboss.cache.factories.UnitTestCacheFactory;
import javax.transaction.TransactionManager;
@@ -31,14 +33,14 @@
cache = new CacheSPI[2];
// start a single cache instance
- cache[0] = (CacheSPI) DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml", false);
+ cache[0] = (CacheSPI) DefaultCacheFactory.getInstance().createCache(UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC), 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.getInstance().createCache("META-INF/replSync-service.xml", false);
+ cache[1] = (CacheSPI) DefaultCacheFactory.getInstance().createCache(UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC), false);
cache[1].getConfiguration().setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
cache[1].start();
}
1.8 +7 -6 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.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- CacheSPITest.java 10 Jan 2007 02:03:00 -0000 1.7
+++ CacheSPITest.java 10 Jan 2007 15:29:10 -0000 1.8
@@ -3,7 +3,9 @@
import junit.framework.TestCase;
import org.jboss.cache.CacheSPI;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.DefaultCacheFactory;
+import org.jboss.cache.factories.UnitTestCacheFactory;
import org.jboss.cache.factories.XmlConfigurationParser;
import java.util.List;
@@ -19,10 +21,9 @@
{
super.setUp();
- XmlConfigurationParser parser = new XmlConfigurationParser();
- Configuration conf1 = parser.parseFile("META-INF/replSync-service.xml");
+ Configuration conf1 = UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC);
- Configuration conf2 = parser.parseFile("META-INF/replSync-service.xml");
+ Configuration conf2 = UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC);
conf1.setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
conf2.setNodeLockingScheme(optimistic ? Configuration.NodeLockingScheme.OPTIMISTIC : Configuration.NodeLockingScheme.PESSIMISTIC);
@@ -78,9 +79,9 @@
public void testIsCoordinator() throws Exception
{
XmlConfigurationParser parser = new XmlConfigurationParser();
- Configuration conf1 = parser.parseFile("META-INF/replSync-service.xml");
+ Configuration conf1 = UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC);
- Configuration conf2 = parser.parseFile("META-INF/replSync-service.xml");
+ Configuration conf2 = UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC);
cache1 = (CacheSPI) DefaultCacheFactory.getInstance().createCache(conf1, false);
cache2 = (CacheSPI) DefaultCacheFactory.getInstance().createCache(conf2, false);
1.7 +4 -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.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- SyncReplTxTest.java 4 Jan 2007 14:36:00 -0000 1.6
+++ SyncReplTxTest.java 10 Jan 2007 15:29:10 -0000 1.7
@@ -14,7 +14,9 @@
import org.jboss.cache.InvocationContext;
import org.jboss.cache.Node;
import org.jboss.cache.config.Option;
+import org.jboss.cache.config.Configuration.CacheMode;
import org.jboss.cache.factories.DefaultCacheFactory;
+import org.jboss.cache.factories.UnitTestCacheFactory;
import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManager;
@@ -36,8 +38,8 @@
{
System.out.println("*** In setUp()");
caches = new CacheSPI[2];
- caches[0] = (CacheSPI) DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml");
- caches[1] = (CacheSPI) DefaultCacheFactory.getInstance().createCache("META-INF/replSync-service.xml");
+ caches[0] = (CacheSPI) DefaultCacheFactory.getInstance().createCache(UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC));
+ caches[1] = (CacheSPI) DefaultCacheFactory.getInstance().createCache(UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC));
TestingUtil.blockUntilViewsReceived(caches, 5000);
System.out.println("*** Finished setUp()");
More information about the jboss-cvs-commits
mailing list