[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/eviction ...
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/eviction
ElementSizePolicyTest.java FIFOPolicyTest.java
LRUPolicyTest.java ReplicatedLRUPolicyTest.java
Log:
migrated to new configurators
Revision Changes Path
1.3 +2 -3 JBossCache/tests/functional/org/jboss/cache/eviction/ElementSizePolicyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ElementSizePolicyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/ElementSizePolicyTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- ElementSizePolicyTest.java 20 Jul 2006 10:54:00 -0000 1.2
+++ ElementSizePolicyTest.java 20 Jul 2006 11:48:26 -0000 1.3
@@ -9,8 +9,8 @@
import junit.framework.TestCase;
import org.jboss.cache.DataNode;
import org.jboss.cache.Fqn;
-import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.TreeCache;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
/**
@@ -47,8 +47,7 @@
void initCaches() throws Exception
{
cache = new TreeCache();
- PropertyConfigurator config = new PropertyConfigurator();
- config.configure(cache, "META-INF/local-elementsize-eviction-service.xml"); // read in generic local xml
+ cache.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/local-elementsize-eviction-service.xml")); // read in generic local xml
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache.startService();
1.5 +4 -5 JBossCache/tests/functional/org/jboss/cache/eviction/FIFOPolicyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: FIFOPolicyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/FIFOPolicyTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- FIFOPolicyTest.java 20 Jul 2006 10:54:00 -0000 1.4
+++ FIFOPolicyTest.java 20 Jul 2006 11:48:26 -0000 1.5
@@ -8,16 +8,16 @@
import junit.framework.TestCase;
import org.jboss.cache.Fqn;
-import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.TreeCache;
-import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
+import org.jboss.cache.misc.TestingUtil;
/**
* Unit tests for FIFOPolicy.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public class FIFOPolicyTest extends TestCase
{
@@ -49,8 +49,7 @@
void initCaches() throws Exception
{
cache = new TreeCache();
- PropertyConfigurator config = new PropertyConfigurator();
- config.configure(cache, "META-INF/local-fifo-eviction-service.xml"); // read in generic local xml
+ cache.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/local-fifo-eviction-service.xml")); // read in generic local xml
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache.startService();
1.12 +3 -4 JBossCache/tests/functional/org/jboss/cache/eviction/LRUPolicyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LRUPolicyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/LRUPolicyTest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- LRUPolicyTest.java 20 Jul 2006 10:31:26 -0000 1.11
+++ LRUPolicyTest.java 20 Jul 2006 11:48:26 -0000 1.12
@@ -4,8 +4,8 @@
import junit.framework.TestCase;
import junit.framework.TestSuite;
import org.jboss.cache.Fqn;
-import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.TreeCache;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.misc.TestingUtil;
@@ -14,7 +14,7 @@
*
* @author Ben Wang, Feb 11, 2004
* @author Daniel Huang - dhuang at jboss.org
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
*/
public class LRUPolicyTest extends TestCase
{
@@ -46,8 +46,7 @@
public void initCaches() throws Exception
{
cache_ = new TreeCache();
- PropertyConfigurator config = new PropertyConfigurator();
- config.configure(cache_, "META-INF/local-lru-eviction-service.xml"); // read in generic local xml
+ cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/local-lru-eviction-service.xml")); // read in generic local xml
cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache_.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache_.startService();
1.10 +3 -5 JBossCache/tests/functional/org/jboss/cache/eviction/ReplicatedLRUPolicyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ReplicatedLRUPolicyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/ReplicatedLRUPolicyTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- ReplicatedLRUPolicyTest.java 20 Jul 2006 10:31:26 -0000 1.9
+++ ReplicatedLRUPolicyTest.java 20 Jul 2006 11:48:26 -0000 1.10
@@ -3,8 +3,8 @@
import junit.framework.TestCase;
import org.jboss.cache.AbstractCacheListener;
import org.jboss.cache.Fqn;
-import org.jboss.cache.PropertyConfigurator;
import org.jboss.cache.TreeCache;
+import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.misc.TestingUtil;
/**
@@ -37,8 +37,7 @@
// cache1_.startService();
// cache2 doesn't have eviction policy
cache2_ = new TreeCache();
- PropertyConfigurator config = new PropertyConfigurator();
- config.configure(cache2_, "META-INF/replSync-service.xml"); // read in generic local xml
+ cache2_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml")); // read in generic local xml
cache2_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache2_.getConfiguration().setUseRegionBasedMarshalling(true);
cache2_.startService();
@@ -51,8 +50,7 @@
void initCaches(TreeCache cache) throws Exception
{
- PropertyConfigurator config = new PropertyConfigurator();
- config.configure(cache, "META-INF/replSync-eviction-service.xml"); // read in generic local xml
+ cache.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-eviction-service.xml")); // read in generic local xml
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
}
More information about the jboss-cvs-commits
mailing list