[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/eviction ...
Elias Ross
genman at noderunner.net
Wed Feb 7 17:06:40 EST 2007
User: genman
Date: 07/02/07 17:06:40
Modified: tests/functional/org/jboss/cache/eviction
LRUPolicyTest.java OptimisticEvictionTest.java
MRUAlgorithmTest.java FIFOPolicyTest.java
ProgrammaticLRUPolicyTest.java
ElementSizePolicyTest.java LRUAlgorithmTest.java
LFUPolicyTest.java ReplicatedLRUPolicyTest.java
EvictionConfigurationTest.java MRUPolicyTest.java
ConcurrentEvictionTest.java
Log:
JBCACHE-969 - Move transaction classes to org.jboss.cache.transaction
Revision Changes Path
1.24 +2 -2 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.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- LRUPolicyTest.java 29 Jan 2007 05:00:48 -0000 1.23
+++ LRUPolicyTest.java 7 Feb 2007 22:06:39 -0000 1.24
@@ -14,7 +14,7 @@
*
* @author Ben Wang, Feb 11, 2004
* @author Daniel Huang - dhuang at jboss.org
- * @version $Revision: 1.23 $
+ * @version $Revision: 1.24 $
*/
public class LRUPolicyTest extends TestCase
{
@@ -48,7 +48,7 @@
public void initCaches() throws Exception
{
cache_ = (CacheImpl) DefaultCacheFactory.getInstance().createCache("META-INF/local-lru-eviction-service.xml", false);// read in generic local xml
- cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache_.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache_.start();
}
1.12 +1 -1 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.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- OptimisticEvictionTest.java 29 Jan 2007 05:27:25 -0000 1.11
+++ OptimisticEvictionTest.java 7 Feb 2007 22:06:39 -0000 1.12
@@ -3,10 +3,10 @@
import junit.framework.TestCase;
import org.jboss.cache.CacheImpl;
import org.jboss.cache.DefaultCacheFactory;
-import org.jboss.cache.DummyTransactionManagerLookup;
import org.jboss.cache.Fqn;
import org.jboss.cache.interceptors.EvictionInterceptor;
import org.jboss.cache.misc.TestingUtil;
+import org.jboss.cache.transaction.DummyTransactionManagerLookup;
import javax.transaction.TransactionManager;
import java.util.Iterator;
1.6 +4 -2 JBossCache/tests/functional/org/jboss/cache/eviction/MRUAlgorithmTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MRUAlgorithmTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/MRUAlgorithmTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- MRUAlgorithmTest.java 18 Jan 2007 16:55:19 -0000 1.5
+++ MRUAlgorithmTest.java 7 Feb 2007 22:06:39 -0000 1.6
@@ -15,7 +15,7 @@
* Unit tests for MRUAlgorithm.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class MRUAlgorithmTest extends TestCase
{
@@ -98,6 +98,7 @@
region.putNodeEvent(new EvictedEventNode(fqn10, NodeEventType.ADD_NODE_EVENT));
Thread.sleep(5000);
+ assertEquals(8, algorithm.getEvictionQueue().getNumberOfNodes());
region.putNodeEvent(new EvictedEventNode(fqn2, NodeEventType.ADD_NODE_EVENT));
region.putNodeEvent(new EvictedEventNode(fqn4, NodeEventType.ADD_NODE_EVENT));
@@ -107,7 +108,8 @@
assertEquals(8, algorithm.getEvictionQueue().getNumberOfNodes());
assertNull(algorithm.getEvictionQueue().getNodeEntry(fqn2));
- assertNull(algorithm.getEvictionQueue().getNodeEntry(fqn4));
+ assertNull("No FQN4 " + algorithm.getEvictionQueue(),
+ algorithm.getEvictionQueue().getNodeEntry(fqn4));
assertNotNull(algorithm.getEvictionQueue().getNodeEntry(fqn1));
assertNotNull(algorithm.getEvictionQueue().getNodeEntry(fqn3));
1.14 +2 -2 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.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- FIFOPolicyTest.java 11 Jan 2007 13:49:05 -0000 1.13
+++ FIFOPolicyTest.java 7 Feb 2007 22:06:39 -0000 1.14
@@ -17,7 +17,7 @@
* Unit tests for FIFOPolicy.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.13 $
+ * @version $Revision: 1.14 $
*/
public class FIFOPolicyTest extends TestCase
{
@@ -51,7 +51,7 @@
void initCaches() throws Exception
{
cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache("META-INF/local-fifo-eviction-service.xml", false);// read in generic local xml
- cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache.start();
}
1.11 +2 -2 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.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- ProgrammaticLRUPolicyTest.java 11 Jan 2007 13:49:05 -0000 1.10
+++ ProgrammaticLRUPolicyTest.java 7 Feb 2007 22:06:39 -0000 1.11
@@ -41,7 +41,7 @@
* Unit tests for programmatic configuration of LRU policy
*
* @author Ben Wang, Oct, 2006
- * @version $Revision: 1.10 $
+ * @version $Revision: 1.11 $
*/
public class ProgrammaticLRUPolicyTest extends TestCase
{
@@ -69,7 +69,7 @@
public void initCaches() throws Exception
{
cache_ = (CacheImpl) DefaultCacheFactory.getInstance().createCache("META-INF/local-lru-eviction-service.xml", false);// read in generic local xml
- cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache_.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache_.create();
1.14 +1 -1 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.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- ElementSizePolicyTest.java 11 Jan 2007 13:49:05 -0000 1.13
+++ ElementSizePolicyTest.java 7 Feb 2007 22:06:39 -0000 1.14
@@ -50,7 +50,7 @@
void initCaches() throws Exception
{
cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache("META-INF/local-elementsize-eviction-service.xml", false);// read in generic local xml
- cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache.start();
}
1.10 +2 -1 JBossCache/tests/functional/org/jboss/cache/eviction/LRUAlgorithmTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LRUAlgorithmTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/eviction/LRUAlgorithmTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- LRUAlgorithmTest.java 18 Jan 2007 16:55:19 -0000 1.9
+++ LRUAlgorithmTest.java 7 Feb 2007 22:06:39 -0000 1.10
@@ -428,6 +428,7 @@
TestingUtil.sleepThread(3000);
region.putNodeEvent(new EvictedEventNode(fqn3, NodeEventType.VISIT_NODE_EVENT));
+ TestingUtil.sleepThread(500);
try
{
algo_.process(region);
@@ -438,7 +439,7 @@
e.printStackTrace();
}
- TestingUtil.sleepThread(1000);
+ TestingUtil.sleepThread(1000); // Fairly random ?
assertEquals("Queue size #3: ", 0, algo_.getEvictionQueue().getNumberOfNodes());
}
1.12 +2 -2 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.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- LFUPolicyTest.java 11 Jan 2007 13:49:05 -0000 1.11
+++ LFUPolicyTest.java 7 Feb 2007 22:06:39 -0000 1.12
@@ -17,7 +17,7 @@
* Unit tests for LFU Policy.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
*/
public class LFUPolicyTest extends TestCase
{
@@ -51,7 +51,7 @@
void initCaches() throws Exception
{
cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache("META-INF/local-lfu-eviction-service.xml", false);
- cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache.start();
}
1.19 +2 -2 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.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- ReplicatedLRUPolicyTest.java 11 Jan 2007 13:49:05 -0000 1.18
+++ ReplicatedLRUPolicyTest.java 7 Feb 2007 22:06:39 -0000 1.19
@@ -36,7 +36,7 @@
cache2_ = (CacheImpl) DefaultCacheFactory.getInstance().createCache(false);
cache2_.setConfiguration(UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC));// read in generic local xml
- cache2_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache2_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache2_.getConfiguration().setUseRegionBasedMarshalling(true);
cache2_.start();
@@ -51,7 +51,7 @@
void initCaches(CacheImpl cache) throws Exception
{
cache.setConfiguration(UnitTestCacheFactory.createConfiguration(CacheMode.REPL_SYNC, true));
- cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
}
public void tearDown() throws Exception
1.15 +2 -2 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.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- EvictionConfigurationTest.java 19 Jan 2007 16:00:32 -0000 1.14
+++ EvictionConfigurationTest.java 7 Feb 2007 22:06:39 -0000 1.15
@@ -18,7 +18,7 @@
* Unit test to test Eviction configuration types.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.14 $
+ * @version $Revision: 1.15 $
*/
public class EvictionConfigurationTest extends TestCase
{
@@ -207,7 +207,7 @@
private void setupCache(String configurationName) throws Exception
{
cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache(configurationName, false);
- cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache.start();
regionManager = cache.getRegionManager();
1.14 +2 -2 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.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- MRUPolicyTest.java 11 Jan 2007 13:49:05 -0000 1.13
+++ MRUPolicyTest.java 7 Feb 2007 22:06:39 -0000 1.14
@@ -16,7 +16,7 @@
* Unit tests for MRUPolicy.
*
* @author Daniel Huang (dhuang at jboss.org)
- * @version $Revision: 1.13 $
+ * @version $Revision: 1.14 $
*/
public class MRUPolicyTest extends TestCase
{
@@ -52,7 +52,7 @@
private void initCaches() throws Exception
{
cache = (CacheImpl) DefaultCacheFactory.getInstance().createCache("META-INF/local-mru-eviction-service.xml", false);// read in generic local xml
- cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache.getConfiguration().setIsolationLevel(IsolationLevel.SERIALIZABLE);
cache.start();
}
1.9 +2 -2 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.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- ConcurrentEvictionTest.java 11 Jan 2007 13:49:05 -0000 1.8
+++ ConcurrentEvictionTest.java 7 Feb 2007 22:06:39 -0000 1.9
@@ -19,7 +19,7 @@
* Tests cache behavior in the presence of concurrent passivation.
*
* @author Brian Stansberry
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
*/
public class ConcurrentEvictionTest extends TestCase
{
@@ -47,7 +47,7 @@
{
TestingUtil.recursiveFileRemove("/tmp/JBossCacheFileCacheLoader");
cache_ = (CacheImpl) DefaultCacheFactory.getInstance().createCache("META-INF/local-eviction-cacheloader-service.xml", false);// read in generic local xml
- cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.DummyTransactionManagerLookup");
+ cache_.getConfiguration().setTransactionManagerLookupClass("org.jboss.cache.transaction.DummyTransactionManagerLookup");
cache_.start();
}
More information about the jboss-cvs-commits
mailing list