[jboss-cvs] JBossCache/tests-50/functional/org/jboss/cache/pojo/statetransfer ...
Vladmir Blagojevic
vladimir.blagojevic at jboss.com
Wed Jan 10 11:44:14 EST 2007
User: vblagojevic
Date: 07/01/10 11:44:14
Modified: tests-50/functional/org/jboss/cache/pojo/statetransfer
ReplicatedTest.java StateTransferAopTestBase.java
Log:
JBCACHE-840 (work in progress)
Revision Changes Path
1.4 +4 -3 JBossCache/tests-50/functional/org/jboss/cache/pojo/statetransfer/ReplicatedTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ReplicatedTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests-50/functional/org/jboss/cache/pojo/statetransfer/ReplicatedTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ReplicatedTest.java 30 Dec 2006 17:50:07 -0000 1.3
+++ ReplicatedTest.java 10 Jan 2007 16:44:14 -0000 1.4
@@ -28,6 +28,8 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheImpl;
+import org.jboss.cache.config.Configuration.CacheMode;
+import org.jboss.cache.factories.UnitTestCacheFactory;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
import org.jboss.cache.pojo.test.Person;
@@ -85,14 +87,13 @@
public void testSimple() throws Exception
{
- String configFile = "META-INF/replSync-service.xml";
boolean toStart = true;
- cache = PojoCacheFactory.createCache(configFile, toStart);
+ cache = PojoCacheFactory.createCache(UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC), toStart);
Person ben = createPerson("/person/test1", "Ben Wang", 40);
System.out.println("\n*** I ***");
System.out.println(((CacheImpl) cache.getCache()).printDetails());
- cache1 = PojoCacheFactory.createCache(configFile, toStart);
+ cache1 = PojoCacheFactory.createCache(UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC), toStart);
cache1.start();
System.out.println("\n*** II ***");
1.12 +5 -3 JBossCache/tests-50/functional/org/jboss/cache/pojo/statetransfer/StateTransferAopTestBase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: StateTransferAopTestBase.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests-50/functional/org/jboss/cache/pojo/statetransfer/StateTransferAopTestBase.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- StateTransferAopTestBase.java 9 Jan 2007 20:16:51 -0000 1.11
+++ StateTransferAopTestBase.java 10 Jan 2007 16:44:14 -0000 1.12
@@ -17,6 +17,8 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.config.CacheLoaderConfig;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.config.Configuration.CacheMode;
+import org.jboss.cache.factories.UnitTestCacheFactory;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.loader.CacheLoader;
import org.jboss.cache.misc.TestingUtil;
@@ -39,7 +41,7 @@
* Tests state transfer in PojoCache.
*
* @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
*/
public abstract class StateTransferAopTestBase extends TestCase
{
@@ -582,8 +584,8 @@
if (caches.get(cacheID) != null)
throw new IllegalStateException(cacheID + " already created");
- XmlConfigurationParser parser = new XmlConfigurationParser();
- Configuration c = parser.parseFile(sync ? "META-INF/replSync-service.xml" : "META-INF/replAsync-service.xml");
+ CacheMode mode = sync ? CacheMode.REPL_SYNC:CacheMode.REPL_ASYNC;
+ Configuration c = UnitTestCacheFactory.createConfiguration(mode);
c.setClusterName("StateTransferTestBase");
c.setReplVersionString(getReplicationVersion());
// Use a long timeout to facilitate setting debugger breakpoints
More information about the jboss-cvs-commits
mailing list