[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/eviction ...
Manik Surtani
msurtani at jboss.com
Wed Sep 6 11:30:57 EDT 2006
User: msurtani
Date: 06/09/06 11:30:57
Modified: tests/functional/org/jboss/cache/eviction
ElementSizePolicyTest.java
EvictionConfigurationTest.java FIFOPolicyTest.java
LFUPolicyTest.java LRUPolicyTest.java
MRUPolicyTest.java OptimisticEvictionTest.java
ReplicatedAopLRUPolicyTest.java
ReplicatedLRUPolicyTest.java
Log:
Removed TreeCache dependency on ServiceMBeanSupport
Revision Changes Path
1.4 +2 -2 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.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- ElementSizePolicyTest.java 20 Jul 2006 11:48:26 -0000 1.3
+++ ElementSizePolicyTest.java 6 Sep 2006 15:30:57 -0000 1.4
@@ -50,13 +50,13 @@
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();
+ cache.start();
}
public void tearDown() throws Exception
{
super.tearDown();
- cache.stopService();
+ cache.stop();
}
public void testEviction() throws Exception
1.8 +5 -5 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.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- EvictionConfigurationTest.java 20 Jul 2006 04:49:52 -0000 1.7
+++ EvictionConfigurationTest.java 6 Sep 2006 15:30:57 -0000 1.8
@@ -16,7 +16,7 @@
* Unit test to test Eviction configuration types.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
*/
public class EvictionConfigurationTest extends TestCase
{
@@ -84,7 +84,7 @@
assertEquals(1000, ((LRUConfiguration) configuration).getTimeToLiveSeconds());
assertEquals(0, ((LRUConfiguration) configuration).getMaxAgeSeconds());
- cache.stopService();
+ cache.stop();
}
public void testMixedPolicies() throws Exception
@@ -129,7 +129,7 @@
assertEquals(8, ((LRUConfiguration) configuration).getTimeToLiveSeconds());
assertEquals(10, ((LRUConfiguration) configuration).getMaxAgeSeconds());
- cache.stopService();
+ cache.stop();
}
public void testLegacyPolicyConfiguration() throws Exception
@@ -185,7 +185,7 @@
assertEquals(1000, ((LRUConfiguration) configuration).getTimeToLiveSeconds());
assertEquals(0, ((LRUConfiguration) configuration).getMaxAgeSeconds());
- cache.stopService();
+ cache.stop();
}
@@ -210,7 +210,7 @@
c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
c.setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache.setConfiguration(c);
- cache.startService();
+ cache.start();
regionManager = cache.getEvictionRegionManager();
}
}
1.6 +11 -11 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.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- FIFOPolicyTest.java 20 Jul 2006 11:48:26 -0000 1.5
+++ FIFOPolicyTest.java 6 Sep 2006 15:30:57 -0000 1.6
@@ -17,7 +17,7 @@
* Unit tests for FIFOPolicy.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class FIFOPolicyTest extends TestCase
{
@@ -52,13 +52,13 @@
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();
+ cache.start();
}
public void tearDown() throws Exception
{
super.tearDown();
- cache.stopService();
+ cache.stop();
}
public void testEviction()
1.5 +3 -3 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.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- LFUPolicyTest.java 20 Jul 2006 08:05:17 -0000 1.4
+++ LFUPolicyTest.java 6 Sep 2006 15:30:57 -0000 1.5
@@ -18,7 +18,7 @@
* Unit tests for LFU Policy.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public class LFUPolicyTest extends TestCase
{
@@ -55,13 +55,13 @@
cache.setConfiguration(c);
c.setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
c.setIsolationLevel(IsolationLevel.SERIALIZABLE);
- cache.startService();
+ cache.start();
}
public void tearDown() throws Exception
{
super.tearDown();
- cache.stopService();
+ cache.stop();
}
public void testEviction() throws Exception
1.13 +3 -3 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.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- LRUPolicyTest.java 20 Jul 2006 11:48:26 -0000 1.12
+++ LRUPolicyTest.java 6 Sep 2006 15:30:57 -0000 1.13
@@ -14,7 +14,7 @@
*
* @author Ben Wang, Feb 11, 2004
* @author Daniel Huang - dhuang at jboss.org
- * @version $Revision: 1.12 $
+ * @version $Revision: 1.13 $
*/
public class LRUPolicyTest extends TestCase
{
@@ -49,13 +49,13 @@
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();
+ cache_.start();
}
public void tearDown() throws Exception
{
super.tearDown();
- cache_.stopService();
+ cache_.stop();
}
public void testInUseEviction() throws Exception
1.7 +3 -3 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.6
retrieving revision 1.7
diff -u -b -r1.6 -r1.7
--- MRUPolicyTest.java 20 Jul 2006 09:03:53 -0000 1.6
+++ MRUPolicyTest.java 6 Sep 2006 15:30:57 -0000 1.7
@@ -16,7 +16,7 @@
* Unit tests for MRUPolicy.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public class MRUPolicyTest extends TestCase
{
@@ -44,7 +44,7 @@
public void tearDown() throws Exception
{
super.tearDown();
- cache.stopService();
+ cache.stop();
}
private void initCaches() throws Exception
@@ -54,7 +54,7 @@
cache.setConfiguration(parser.parseFile("META-INF/local-mru-eviction-service.xml")); // read in generic local xml
cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
- cache.startService();
+ cache.start();
}
public void testEviction() throws Exception
1.8 +2 -2 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.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- OptimisticEvictionTest.java 30 Aug 2006 18:43:16 -0000 1.7
+++ OptimisticEvictionTest.java 6 Sep 2006 15:30:57 -0000 1.8
@@ -39,14 +39,14 @@
txManager = new DummyTransactionManagerLookup().getTransactionManager();
cache = new TreeCache();
cache.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/optimistic-eviction.xml"));
- cache.startService();
+ cache.start();
}
protected void tearDown() throws Exception
{
if (cache != null)
{
- cache.stopService();
+ cache.stop();
cache = null;
}
super.tearDown();
1.10 +5 -5 JBossCache/tests/functional/org/jboss/cache/eviction/ReplicatedAopLRUPolicyTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ReplicatedAopLRUPolicyTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/ReplicatedAopLRUPolicyTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- ReplicatedAopLRUPolicyTest.java 30 Aug 2006 18:32:17 -0000 1.9
+++ ReplicatedAopLRUPolicyTest.java 6 Sep 2006 15:30:57 -0000 1.10
@@ -31,14 +31,14 @@
cache_.getConfiguration().setUseRegionBasedMarshalling(true);
// cache1_ = new TreeCache();
// initCaches(cache1_);
- cache_.startService();
-// cache1_.startService();
+ cache_.start();
+// cache1_.start();
// cache2 doesn't have eviction policy
cache2_ = new TreeCache();
cache2_.setConfiguration(new XmlConfigurationParser().parseFile("META-INF/replSync-service.xml"));
cache2_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
- cache2_.startService();
+ cache2_.start();
wakeupIntervalMillis_ = cache_.getEvictionThreadWakeupIntervalSeconds() * 1000;
log("wakeupInterval is " + wakeupIntervalMillis_);
@@ -55,8 +55,8 @@
public void tearDown() throws Exception
{
super.tearDown();
- cache_.stopService();
- cache2_.stopService();
+ cache_.stop();
+ cache2_.stop();
}
/**
1.13 +7 -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.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- ReplicatedLRUPolicyTest.java 25 Aug 2006 14:55:07 -0000 1.12
+++ ReplicatedLRUPolicyTest.java 6 Sep 2006 15:30:57 -0000 1.13
@@ -28,7 +28,7 @@
cache_ = new TreeCache();
initCaches(cache_);
cache_.getConfiguration().setUseRegionBasedMarshalling(true);
- cache_.startService();
+ cache_.start();
cache_.getNotifier().addCacheListener(listener_);
listener_.resetCounter();
@@ -36,7 +36,7 @@
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();
+ cache2_.start();
wakeupIntervalMillis_ = cache_.getEvictionThreadWakeupIntervalSeconds() * 1000;
log("wakeupInterval is " + wakeupIntervalMillis_);
@@ -55,8 +55,8 @@
public void tearDown() throws Exception
{
super.tearDown();
- cache_.stopService();
- cache2_.stopService();
+ cache_.stop();
+ cache2_.stop();
}
/**
@@ -126,7 +126,9 @@
int counter = 0;
public int getCounter()
- { return counter; }
+ {
+ return counter;
+ }
public void resetCounter()
{
More information about the jboss-cvs-commits
mailing list