[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/eviction ...
Manik Surtani
msurtani at jboss.com
Sat Dec 30 12:49:58 EST 2006
User: msurtani
Date: 06/12/30 12:49:58
Modified: tests/functional/org/jboss/cache/eviction
LFUAlgorithmTest.java
EvictionConfigurationTest.java
ProgrammaticLRUPolicyTest.java
ElementSizePolicyTest.java FIFOPolicyTest.java
ExpirationPolicyTest.java
ConcurrentEvictionTest.java RegionManagerTest.java
LFUPolicyTest.java LRUPolicyTest.java
ReplicatedLRUPolicyTest.java
OptimisticEvictionTest.java MRUPolicyTest.java
DummyEvictionPolicy.java
Log:
Major changes to restructure cache and node object model
Revision Changes Path
1.7 +3 -7 JBossCache/tests/functional/org/jboss/cache/eviction/LFUAlgorithmTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LFUAlgorithmTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/LFUAlgorithmTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- LFUAlgorithmTest.java 15 Nov 2006 15:16:39 -0000 1.6
+++ LFUAlgorithmTest.java 30 Dec 2006 17:49:58 -0000 1.7
@@ -9,10 +9,10 @@
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
-import org.jboss.cache.TreeCache;
import java.util.Iterator;
@@ -20,7 +20,7 @@
* Unit test for LFUAlgorithm.
*
* @author Daniel Huang - dhuang at jboss.org - 10/2005
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class LFUAlgorithmTest extends TestCase
{
@@ -39,7 +39,7 @@
algo = new LFUAlgorithm();
LFUConfiguration config = new LFUConfiguration();
- regionManager = new RegionManager(new TreeCache());
+ regionManager = new RegionManager(new CacheImpl());
config.setEvictionPolicyClass(DummyEvictionPolicy.class.getName());
regionManager.getRegion("/a/b", true).setEvictionPolicy(config);
// doesn't this need a cache?!?? :-/
@@ -242,7 +242,6 @@
// fqn3 visited 1 additional time.
region.putNodeEvent(new EvictedEventNode(fqn3, NodeEventType.VISIT_NODE_EVENT));
-
// fqn4 visited 2 additional times.
region.putNodeEvent(new EvictedEventNode(fqn4, NodeEventType.VISIT_NODE_EVENT));
region.putNodeEvent(new EvictedEventNode(fqn4, NodeEventType.VISIT_NODE_EVENT));
@@ -250,7 +249,6 @@
// fqn9 visited 1 additional time.
region.putNodeEvent(new EvictedEventNode(fqn9, NodeEventType.VISIT_NODE_EVENT));
-
// fqn10 visited 2 additional times.
region.putNodeEvent(new EvictedEventNode(fqn10, NodeEventType.VISIT_NODE_EVENT));
region.putNodeEvent(new EvictedEventNode(fqn10, NodeEventType.VISIT_NODE_EVENT));
@@ -377,8 +375,6 @@
region.putNodeEvent(new EvictedEventNode(fqn11, NodeEventType.VISIT_NODE_EVENT));
region.putNodeEvent(new EvictedEventNode(fqn4, NodeEventType.VISIT_NODE_EVENT));
-
-
// purposefully revisit a node that has been removed. assert that it is readded.
region.putNodeEvent(new EvictedEventNode(fqn1, NodeEventType.VISIT_NODE_EVENT));
region.putNodeEvent(new EvictedEventNode(fqn1, NodeEventType.VISIT_NODE_EVENT));
1.12 +6 -6 JBossCache/tests/functional/org/jboss/cache/eviction/EvictionConfigurationTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: EvictionConfigurationTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/EvictionConfigurationTest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- EvictionConfigurationTest.java 15 Nov 2006 15:16:39 -0000 1.11
+++ EvictionConfigurationTest.java 30 Dec 2006 17:49:58 -0000 1.12
@@ -7,10 +7,10 @@
package org.jboss.cache.eviction;
import junit.framework.TestCase;
-import org.jboss.cache.TreeCache;
+import org.jboss.cache.CacheImpl;
+import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
-import org.jboss.cache.Fqn;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
@@ -19,11 +19,11 @@
* Unit test to test Eviction configuration types.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
*/
public class EvictionConfigurationTest extends TestCase
{
- TreeCache cache;
+ CacheImpl cache;
RegionManager regionManager;
public void setUp() throws Exception
@@ -195,7 +195,7 @@
public void testTwoCacheInstanceConfiguration() throws Exception
{
this.setupCache("META-INF/local-lru-eviction-service.xml");
- TreeCache cache1 = cache;
+ CacheImpl cache1 = cache;
this.setupCache("META-INF/local-lru-eviction-service.xml");
}
@@ -207,7 +207,7 @@
private void setupCache(String configurationName) throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
XmlConfigurationParser parser = new XmlConfigurationParser();
Configuration c = parser.parseFile(configurationName);
c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
1.8 +20 -20 JBossCache/tests/functional/org/jboss/cache/eviction/ProgrammaticLRUPolicyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ProgrammaticLRUPolicyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/ProgrammaticLRUPolicyTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- ProgrammaticLRUPolicyTest.java 15 Nov 2006 15:48:25 -0000 1.7
+++ ProgrammaticLRUPolicyTest.java 30 Dec 2006 17:49:58 -0000 1.8
@@ -22,29 +22,29 @@
package org.jboss.cache.eviction;
-import junit.framework.TestCase;
import junit.framework.Test;
+import junit.framework.TestCase;
import junit.framework.TestSuite;
-import org.jboss.cache.TreeCache;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
import org.jboss.cache.RegionManager;
-import org.jboss.cache.xml.XmlHelper;
-import org.jboss.cache.misc.TestingUtil;
-import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.factories.XmlConfigurationParser;
+import org.jboss.cache.lock.IsolationLevel;
+import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.xml.XmlHelper;
import org.w3c.dom.Element;
/**
* Unit tests for programmatic configuration of LRU policy
*
* @author Ben Wang, Oct, 2006
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
*/
public class ProgrammaticLRUPolicyTest extends TestCase
{
- TreeCache cache_;
+ CacheImpl cache_;
int wakeupIntervalMillis_ = 0;
public ProgrammaticLRUPolicyTest(String s)
@@ -65,7 +65,7 @@
public void initCaches() throws Exception
{
- cache_ = new TreeCache();
+ cache_ = new CacheImpl();
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);
@@ -112,7 +112,7 @@
assertNotNull("DataNode should be empty ", val);
System.out.println(cache_.toString());
- TestingUtil.sleepThread(2*wakeupIntervalMillis_ + 500);
+ TestingUtil.sleepThread(2 * wakeupIntervalMillis_ + 500);
System.out.println(cache_.toString());
val = (String) cache_.get(rootStr + "3", rootStr + "3");
assertNull("DataNode should be empty ", val);
@@ -172,7 +172,7 @@
}
System.out.println(cache_.toString());
- TestingUtil.sleepThread(2*wakeupIntervalMillis_ + 500);
+ TestingUtil.sleepThread(2 * wakeupIntervalMillis_ + 500);
System.out.println(cache_.toString());
try
@@ -222,7 +222,7 @@
}
System.out.println(cache_.toString());
- TestingUtil.sleepThread(2*wakeupIntervalMillis_ + 500);
+ TestingUtil.sleepThread(2 * wakeupIntervalMillis_ + 500);
System.out.println(cache_.toString());
try
{
1.10 +7 -7 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.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- ElementSizePolicyTest.java 20 Nov 2006 03:53:56 -0000 1.9
+++ ElementSizePolicyTest.java 30 Dec 2006 17:49:58 -0000 1.10
@@ -7,9 +7,9 @@
package org.jboss.cache.eviction;
import junit.framework.TestCase;
-import org.jboss.cache.DataNode;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
+import org.jboss.cache.Node;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
@@ -19,7 +19,7 @@
*/
public class ElementSizePolicyTest extends TestCase
{
- TreeCache cache;
+ CacheImpl cache;
int wakeupIntervalMillis = 0;
final String ROOT_STR = "/test";
Throwable t1_ex, t2_ex;
@@ -46,7 +46,7 @@
void initCaches() throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
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);
@@ -90,7 +90,7 @@
for (int i = 0; i < 10; i++)
{
- DataNode node = cache.get("/org/jboss/test/data/" + Integer.toString(i));
+ Node node = cache.get("/org/jboss/test/data/" + Integer.toString(i));
System.out.println(node);
if (i % 2 == 0)
{
@@ -136,7 +136,7 @@
{
String str = rootStr + Integer.toString(i);
Fqn fqn = Fqn.fromString(str);
- DataNode node = cache.get(fqn);
+ Node node = cache.get(fqn);
System.out.println(i + " " + node);
if (i > 9)
{
@@ -153,7 +153,7 @@
cache.put("/org/jboss/data/" + Integer.toString(3), new Integer(100 + i), "value");
}
- DataNode node = cache.get("/org/jboss/data/" + Integer.toString(3));
+ Node node = cache.get("/org/jboss/data/" + Integer.toString(3));
assertEquals(21, node.getData().size());
_sleep(wakeupIntervalMillis + 500);
1.11 +4 -4 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.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- FIFOPolicyTest.java 20 Nov 2006 03:53:56 -0000 1.10
+++ FIFOPolicyTest.java 30 Dec 2006 17:49:58 -0000 1.11
@@ -7,8 +7,8 @@
package org.jboss.cache.eviction;
import junit.framework.TestCase;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.misc.TestingUtil;
@@ -17,11 +17,11 @@
* Unit tests for FIFOPolicy.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public class FIFOPolicyTest extends TestCase
{
- TreeCache cache;
+ CacheImpl cache;
int wakeupIntervalMillis = 0;
final String ROOT_STR = "/test";
Throwable t1_ex, t2_ex;
@@ -48,7 +48,7 @@
void initCaches() throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
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);
1.4 +4 -5 JBossCache/tests/functional/org/jboss/cache/eviction/ExpirationPolicyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ExpirationPolicyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/ExpirationPolicyTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ExpirationPolicyTest.java 8 Dec 2006 19:19:05 -0000 1.3
+++ ExpirationPolicyTest.java 30 Dec 2006 17:49:58 -0000 1.4
@@ -7,11 +7,10 @@
package org.jboss.cache.eviction;
import junit.framework.TestCase;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.misc.TestingUtil;
@@ -20,13 +19,13 @@
* Unit tests for {@link ExpirationPolicy}.
*
* @author Elias Ross
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class ExpirationPolicyTest extends TestCase
{
private static final Log log = LogFactory.getLog(ExpirationPolicyTest.class);
- private TreeCache cache;
+ private CacheImpl cache;
Fqn fqn1 = Fqn.fromString("/node/1");
Fqn fqn2 = Fqn.fromString("/node/2");
@@ -39,7 +38,7 @@
public void setUp() throws Exception
{
super.setUp();
- cache = new TreeCache();
+ cache = new CacheImpl();
Configuration conf = new Configuration();
EvictionConfig econf = new EvictionConfig(ExpirationPolicy.class.getName());
econf.setWakeupIntervalSeconds(1);
1.6 +4 -4 JBossCache/tests/functional/org/jboss/cache/eviction/ConcurrentEvictionTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ConcurrentEvictionTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/ConcurrentEvictionTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- ConcurrentEvictionTest.java 20 Dec 2006 13:34:28 -0000 1.5
+++ ConcurrentEvictionTest.java 30 Dec 2006 17:49:58 -0000 1.6
@@ -10,8 +10,8 @@
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.misc.TestingUtil;
@@ -19,11 +19,11 @@
* Tests cache behavior in the presence of concurrent passivation.
*
* @author Brian Stansberry
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class ConcurrentEvictionTest extends TestCase
{
- private TreeCache cache_;
+ private CacheImpl cache_;
private int wakeupIntervalMillis_ = 0;
public ConcurrentEvictionTest(String s)
@@ -44,7 +44,7 @@
void initCaches() throws Exception
{
TestingUtil.recursiveFileRemove("/tmp/JBossCacheFileCacheLoader");
- cache_ = new TreeCache();
+ cache_ = new CacheImpl();
cache_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/local-eviction-cacheloader-service.xml")); // read in generic local xml
cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache_.start();
1.18 +4 -4 JBossCache/tests/functional/org/jboss/cache/eviction/RegionManagerTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: RegionManagerTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/RegionManagerTest.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- RegionManagerTest.java 15 Nov 2006 15:16:39 -0000 1.17
+++ RegionManagerTest.java 30 Dec 2006 17:49:58 -0000 1.18
@@ -1,10 +1,10 @@
package org.jboss.cache.eviction;
import junit.framework.TestCase;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
import org.jboss.cache.Region;
import org.jboss.cache.RegionManager;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.EvictionConfig;
import org.jboss.cache.config.EvictionRegionConfig;
import org.jboss.cache.factories.XmlConfigurationParser;
@@ -18,7 +18,7 @@
*
* @author Ben Wang, Feb 11, 2004
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.17 $
+ * @version $Revision: 1.18 $
*/
public class RegionManagerTest extends TestCase
{
@@ -140,7 +140,7 @@
assertEquals(10, config.getMinNodes());
assertEquals(Fqn.fromString("/test/"), region.getFqn());
- TreeCache cache = new TreeCache();
+ CacheImpl cache = new CacheImpl();
// test the 1.2.x style configuration
xml = "<region name=\"abc\">" +
1.9 +4 -4 JBossCache/tests/functional/org/jboss/cache/eviction/LFUPolicyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LFUPolicyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/LFUPolicyTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- LFUPolicyTest.java 16 Nov 2006 18:41:25 -0000 1.8
+++ LFUPolicyTest.java 30 Dec 2006 17:49:58 -0000 1.9
@@ -7,8 +7,8 @@
package org.jboss.cache.eviction;
import junit.framework.TestCase;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.config.Configuration;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
@@ -18,11 +18,11 @@
* Unit tests for LFU Policy.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
*/
public class LFUPolicyTest extends TestCase
{
- TreeCache cache;
+ CacheImpl cache;
int wakeupIntervalMillis = 0;
final String ROOT_STR = "/test";
Throwable t1_ex, t2_ex;
@@ -49,7 +49,7 @@
void initCaches() throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
XmlConfigurationParser parser = new XmlConfigurationParser();
Configuration c = parser.parseFile("META-INF/local-lfu-eviction-service.xml");
cache.setConfiguration(c);
1.20 +4 -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.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- LRUPolicyTest.java 16 Nov 2006 18:15:27 -0000 1.19
+++ LRUPolicyTest.java 30 Dec 2006 17:49:58 -0000 1.20
@@ -3,8 +3,8 @@
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.misc.TestingUtil;
@@ -14,11 +14,11 @@
*
* @author Ben Wang, Feb 11, 2004
* @author Daniel Huang - dhuang at jboss.org
- * @version $Revision: 1.19 $
+ * @version $Revision: 1.20 $
*/
public class LRUPolicyTest extends TestCase
{
- TreeCache cache_;
+ CacheImpl cache_;
int wakeupIntervalMillis_ = 0;
final String ROOT_STR = "/test";
Throwable t1_ex, t2_ex;
@@ -45,7 +45,7 @@
public void initCaches() throws Exception
{
- cache_ = new TreeCache();
+ cache_ = new CacheImpl();
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);
1.15 +5 -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.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- ReplicatedLRUPolicyTest.java 14 Nov 2006 14:17:10 -0000 1.14
+++ ReplicatedLRUPolicyTest.java 30 Dec 2006 17:49:58 -0000 1.15
@@ -2,8 +2,8 @@
import junit.framework.TestCase;
import org.jboss.cache.AbstractCacheListener;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.misc.TestingUtil;
@@ -12,7 +12,7 @@
*/
public class ReplicatedLRUPolicyTest extends TestCase
{
- TreeCache cache_, cache1_, cache2_;
+ CacheImpl cache_, cache1_, cache2_;
int wakeupIntervalMillis_ = 0;
EvictionListener listener_;
@@ -25,14 +25,14 @@
public void setUp() throws Exception
{
super.setUp();
- cache_ = new TreeCache();
+ cache_ = new CacheImpl();
initCaches(cache_);
cache_.getConfiguration().setUseRegionBasedMarshalling(true);
cache_.start();
cache_.getNotifier().addCacheListener(listener_);
listener_.resetCounter();
- cache2_ = new TreeCache();
+ cache2_ = new CacheImpl();
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);
@@ -46,7 +46,7 @@
}
}
- void initCaches(TreeCache cache) throws Exception
+ void initCaches(CacheImpl cache) throws Exception
{
cache.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-eviction-service.xml")); // read in generic local xml
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
1.9 +3 -3 JBossCache/tests/functional/org/jboss/cache/eviction/OptimisticEvictionTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticEvictionTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/OptimisticEvictionTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- OptimisticEvictionTest.java 6 Sep 2006 15:30:57 -0000 1.8
+++ OptimisticEvictionTest.java 30 Dec 2006 17:49:58 -0000 1.9
@@ -1,9 +1,9 @@
package org.jboss.cache.eviction;
import junit.framework.TestCase;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.DummyTransactionManagerLookup;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.interceptors.EvictionInterceptor;
import org.jboss.cache.misc.TestingUtil;
@@ -30,14 +30,14 @@
private Fqn region = Fqn.fromString("testingRegion");
private TransactionManager txManager;
- private TreeCache cache;
+ private CacheImpl cache;
protected void setUp() throws Exception
{
super.setUp();
txManager = new DummyTransactionManagerLookup().getTransactionManager();
- cache = new TreeCache();
+ cache = new CacheImpl();
cache.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/optimistic-eviction.xml"));
cache.start();
}
1.11 +4 -4 JBossCache/tests/functional/org/jboss/cache/eviction/MRUPolicyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MRUPolicyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/MRUPolicyTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- MRUPolicyTest.java 16 Nov 2006 18:41:25 -0000 1.10
+++ MRUPolicyTest.java 30 Dec 2006 17:49:58 -0000 1.11
@@ -7,7 +7,7 @@
package org.jboss.cache.eviction;
import junit.framework.TestCase;
-import org.jboss.cache.TreeCache;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.factories.XmlConfigurationParser;
import org.jboss.cache.lock.IsolationLevel;
import org.jboss.cache.misc.TestingUtil;
@@ -16,11 +16,11 @@
* Unit tests for MRUPolicy.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public class MRUPolicyTest extends TestCase
{
- TreeCache cache;
+ CacheImpl cache;
int wakeupIntervalMillis = 0;
final String ROOT_STR = "/test";
Throwable t1_ex, t2_ex;
@@ -49,7 +49,7 @@
private void initCaches() throws Exception
{
- cache = new TreeCache();
+ cache = new CacheImpl();
XmlConfigurationParser parser = new XmlConfigurationParser();
cache.setConfiguration(parser.parseFile("META-INF/local-mru-eviction-service.xml")); // read in generic local xml
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
1.3 +2 -2 JBossCache/tests/functional/org/jboss/cache/eviction/DummyEvictionPolicy.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: DummyEvictionPolicy.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/DummyEvictionPolicy.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- DummyEvictionPolicy.java 5 Dec 2005 03:17:14 -0000 1.2
+++ DummyEvictionPolicy.java 30 Dec 2006 17:49:58 -0000 1.3
@@ -1,7 +1,7 @@
package org.jboss.cache.eviction;
+import org.jboss.cache.CacheImpl;
import org.jboss.cache.Fqn;
-import org.jboss.cache.TreeCache;
/**
* @author Ben Feb 13, 2004
@@ -19,7 +19,7 @@
return 0; //To change body of implemented methods use File | Settings | File Templates.
}
- public void configure(TreeCache cache)
+ public void configure(CacheImpl cache)
{
// no op
}
More information about the jboss-cvs-commits
mailing list