[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/aop ...
Manik Surtani
msurtani at jboss.com
Thu Jul 20 07:48:26 EDT 2006
User: msurtani
Date: 06/07/20 07:48:26
Modified: tests/functional/org/jboss/cache/aop
LocalConcurrentTest.java NewReplicatedAopTest.java
NonAspectizedAopTest.java
ReplicatedSerializableAopTest.java
SharedRefConcurrentTest.java
TreeCacheAopCompatibilityAopTest.java
Log:
migrated to new configurators
Revision Changes Path
1.10 +3 -4 JBossCache/tests/functional/org/jboss/cache/aop/LocalConcurrentTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LocalConcurrentTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/LocalConcurrentTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- LocalConcurrentTest.java 20 Jul 2006 10:54:00 -0000 1.9
+++ LocalConcurrentTest.java 20 Jul 2006 11:48:26 -0000 1.10
@@ -12,10 +12,10 @@
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jboss.cache.CacheException;
-import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.aop.test.Address;
import org.jboss.cache.aop.test.Person;
import org.jboss.cache.config.Configuration;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.lock.LockStrategyFactory;
import org.jboss.cache.lock.UpgradeException;
@@ -34,7 +34,7 @@
* Local mode stress test for PojoCache. Test getObject and putObject under load
* and concurrency.
*
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
* @author<a href="mailto:bwang at jboss.org">Ben Wang</a> December 2004
*/
public class LocalConcurrentTest extends TestCase
@@ -94,8 +94,7 @@
{
cachingMode_ = caching_mode;
cache_ = new PojoCache();
- PropertyConfigurator config = new PropertyConfigurator();
- config.configure(cache_, "META-INF/local-service.xml"); // read in generic local xml
+ cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/local-service.xml"));
cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache_.createService();
cache_.startService();
1.13 +3 -8 JBossCache/tests/functional/org/jboss/cache/aop/NewReplicatedAopTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NewReplicatedAopTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/NewReplicatedAopTest.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- NewReplicatedAopTest.java 20 Jun 2006 03:16:06 -0000 1.12
+++ NewReplicatedAopTest.java 20 Jul 2006 11:48:26 -0000 1.13
@@ -5,13 +5,9 @@
import junit.framework.TestSuite;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.PropertyConfigurator;
-//import org.jboss.cache.data.Address;
-//import org.jboss.cache.data.Course;
-//import org.jboss.cache.data.RandomString;
-//import org.jboss.cache.aop.PojoCache;
import org.jboss.cache.aop.test.Person;
import org.jboss.cache.aop.test.SpecialSerializedAddress;
+import org.jboss.cache.factories.XmlConfigurationParser;
import javax.naming.Context;
import java.util.Properties;
@@ -40,11 +36,10 @@
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
cache_ = new PojoCache();
- PropertyConfigurator config = new PropertyConfigurator(); // configure tree cache.
- config.configure(cache_, "META-INF/replSync-service.xml");
+ cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml"));
cache1_ = new PojoCache();
- config.configure(cache1_, "META-INF/replSync-service.xml");
+ cache1_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml"));
cache_.start();
cache1_.start();
}
1.5 +2 -4 JBossCache/tests/functional/org/jboss/cache/aop/NonAspectizedAopTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NonAspectizedAopTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/NonAspectizedAopTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- NonAspectizedAopTest.java 21 May 2006 12:46:38 -0000 1.4
+++ NonAspectizedAopTest.java 20 Jul 2006 11:48:26 -0000 1.5
@@ -5,9 +5,8 @@
import junit.framework.TestSuite;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.PropertyConfigurator;
-import org.jboss.cache.aop.PojoCache;
import org.jboss.cache.aop.test.SerializedAddress;
+import org.jboss.cache.factories.XmlConfigurationParser;
/**
@@ -32,8 +31,7 @@
log_.info("setUp() ....");
String configFile = "META-INF/local-service.xml";
cache_ = new PojoCache();
- PropertyConfigurator config = new PropertyConfigurator();
- config.configure(cache_, configFile); // read in generic replSync xml
+cache_.setConfiguration(new XmlConfigurationParser().parseFile(configFile));
cache_.start();
}
1.4 +5 -6 JBossCache/tests/functional/org/jboss/cache/aop/ReplicatedSerializableAopTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ReplicatedSerializableAopTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/ReplicatedSerializableAopTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ReplicatedSerializableAopTest.java 31 May 2006 09:56:07 -0000 1.3
+++ ReplicatedSerializableAopTest.java 20 Jul 2006 11:48:26 -0000 1.4
@@ -7,15 +7,15 @@
package org.jboss.cache.aop;
-import junit.framework.TestCase;
import junit.framework.Test;
+import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.PropertyConfigurator;
-import org.jboss.cache.aop.test.Student;
import org.jboss.cache.aop.test.CacheObject;
import org.jboss.cache.aop.test.NonSerializableObject;
+import org.jboss.cache.aop.test.Student;
+import org.jboss.cache.factories.XmlConfigurationParser;
import javax.naming.Context;
import java.util.Properties;
@@ -43,11 +43,10 @@
Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
cache_ = new PojoCache();
- PropertyConfigurator config = new PropertyConfigurator(); // configure tree cache.
- config.configure(cache_, "META-INF/replSync-service.xml");
+ cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml"));
cache1_ = new PojoCache();
- config.configure(cache1_, "META-INF/replSync-service.xml");
+ cache1_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml"));
cache_.start();
cache1_.start();
}
1.6 +3 -4 JBossCache/tests/functional/org/jboss/cache/aop/SharedRefConcurrentTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: SharedRefConcurrentTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/SharedRefConcurrentTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- SharedRefConcurrentTest.java 20 Jul 2006 10:31:16 -0000 1.5
+++ SharedRefConcurrentTest.java 20 Jul 2006 11:48:26 -0000 1.6
@@ -12,10 +12,10 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.CacheException;
-import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.TreeCache;
import org.jboss.cache.aop.test.Address;
import org.jboss.cache.aop.test.Person;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.misc.TestingUtil;
import java.util.HashMap;
@@ -27,7 +27,7 @@
* Tests concurrency of the __JBossInternal__ region of the cache.
*
* @author <a href="mailto://brian.stansberry@jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class SharedRefConcurrentTest extends TestCase
{
@@ -143,9 +143,8 @@
throw new IllegalStateException(cacheID + " already created");
PojoCache tree = new PojoCache();
- PropertyConfigurator config = new PropertyConfigurator();
String configFile = sync ? "META-INF/replSync-service.xml" : "META-INF/replAsync-service.xml";
- config.configure(tree, configFile); // read in generic replAsync xml
+tree.setConfiguration(new XmlConfigurationParser().parseFile(configFile));
tree.setDeadlockDetection(sync);
tree.getConfiguration().setClusterName("StateTransferTest");
tree.createService();
1.3 +5 -6 JBossCache/tests/functional/org/jboss/cache/aop/TreeCacheAopCompatibilityAopTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: TreeCacheAopCompatibilityAopTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/aop/TreeCacheAopCompatibilityAopTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- TreeCacheAopCompatibilityAopTest.java 22 Jun 2006 10:43:55 -0000 1.2
+++ TreeCacheAopCompatibilityAopTest.java 20 Jul 2006 11:48:26 -0000 1.3
@@ -7,13 +7,13 @@
package org.jboss.cache.aop;
-import junit.framework.TestCase;
import junit.framework.Test;
+import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.aop.test.Person;
+import org.jboss.cache.factories.XmlConfigurationParser;
import java.util.Map;
@@ -26,7 +26,7 @@
public class TreeCacheAopCompatibilityAopTest extends TestCase
{
Log log_= LogFactory.getLog(TreeCacheAopCompatibilityAopTest.class);
- TreeCacheAopMBean cache_;
+ TreeCacheAop cache_;
public TreeCacheAopCompatibilityAopTest(String name)
{
@@ -38,9 +38,8 @@
super.setUp();
log_.info("setUp() ....");
String configFile = "META-INF/local-service.xml";
- cache_ = (TreeCacheAopMBean)new TreeCacheAop();
- PropertyConfigurator config = new PropertyConfigurator();
- config.configure(cache_, configFile); // read in generic replSync xml
+ cache_ = new TreeCacheAop();
+ cache_.setConfiguration(new XmlConfigurationParser().parseFile(configFile));
cache_.start();
}
More information about the jboss-cvs-commits
mailing list