[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/pojo/passivation ...
Manik Surtani
msurtani at jboss.com
Thu Feb 1 08:03:14 EST 2007
User: msurtani
Date: 07/02/01 08:03:14
Modified: tests/functional/org/jboss/cache/pojo/passivation
LocalTest.java
Log:
fixed test
Revision Changes Path
1.2 +6 -19 JBossCache/tests/functional/org/jboss/cache/pojo/passivation/LocalTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LocalTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/pojo/passivation/LocalTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- LocalTest.java 13 Jan 2007 15:55:13 -0000 1.1
+++ LocalTest.java 1 Feb 2007 13:03:14 -0000 1.2
@@ -14,6 +14,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.cache.AbstractCacheListener;
import org.jboss.cache.Fqn;
+import org.jboss.cache.CacheSPI;
import org.jboss.cache.pojo.PojoCache;
import org.jboss.cache.pojo.PojoCacheFactory;
import org.jboss.cache.pojo.test.Address;
@@ -94,10 +95,7 @@
cache_.attach(id, joe);
Thread.sleep(9100); // default is 3 seconds so joe should have been passivated.
-// assertFalse("Node should be evicted ",
-// cache_.getCache().exists(id));
- assertFalse("Node should be evicted ",
- cache_.getCache().getRoot().hasChild(new Fqn(id)));
+ assertNull("Node should be evicted ", ((CacheSPI)cache_.getCache()).peek(new Fqn(id), false));
assertEquals("age ", 20, joe.getAge());
joe.setAge(30);
@@ -114,8 +112,7 @@
cache_.attach(id, joe);
Thread.sleep(9100); // default is 3 seconds so joe should have been passivated.
- assertFalse("Node should be evicted ",
- cache_.getCache().getRoot().hasChild(new Fqn(id)));
+ assertNull("Node should be evicted ", ((CacheSPI)cache_.getCache()).peek(new Fqn(id), false));
Address addr = new Address();
addr.setCity("Taipei");
@@ -134,15 +131,7 @@
cache_.attach(id, joe);
Thread.sleep(9100); // default is 3 seconds so joe should have been passivated.
-// assertFalse("Node should be evicted ",
-// cache_.getCache().exists(id));
- assertFalse("Node should be evicted ",
- cache_.getCache().getRoot().hasChild(new Fqn(id)));
-
-// assertFalse("Node should be evicted ",
-// cache_.getCache().exists(id));
- assertFalse("Node should be evicted ",
- cache_.getCache().getRoot().hasChild(new Fqn(id)));
+ assertNull("Node should be evicted ", ((CacheSPI)cache_.getCache()).peek(new Fqn(id), false));
Person p = (Person) cache_.find(id);
@@ -186,10 +175,8 @@
assertEquals(add1.getCity(), add2.getCity());
Thread.sleep(9100); // default is 3 seconds so joe should have been passivated.
-// assertFalse("Node should be evicted ",
-// cache_.getCache().exists("/person/joe"));
- assertFalse("Node should be evicted ",
- cache_.getCache().getRoot().hasChild(new Fqn(id)));
+
+ assertNull("Node should be evicted ", ((CacheSPI)cache_.getCache()).peek(new Fqn(id), false));
assertEquals("City is ", "Santa Clara", add2.getCity());
More information about the jboss-cvs-commits
mailing list