[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/api ...
Manik Surtani
manik at jboss.org
Fri Jun 8 12:26:41 EDT 2007
User: msurtani
Date: 07/06/08 12:26:41
Modified: tests/functional/org/jboss/cache/api
CacheAPIOptimisticTest.java CacheAPITest.java
Log:
JBCACHE-1084
Revision Changes Path
1.2 +0 -1 JBossCache/tests/functional/org/jboss/cache/api/CacheAPIOptimisticTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheAPIOptimisticTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/CacheAPIOptimisticTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- CacheAPIOptimisticTest.java 3 Jan 2007 23:45:56 -0000 1.1
+++ CacheAPIOptimisticTest.java 8 Jun 2007 16:26:41 -0000 1.2
@@ -5,7 +5,6 @@
*/
public class CacheAPIOptimisticTest extends CacheAPITest
{
-
public CacheAPIOptimisticTest()
{
optimistic = true;
1.16 +22 -0 JBossCache/tests/functional/org/jboss/cache/api/CacheAPITest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheAPITest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/api/CacheAPITest.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- CacheAPITest.java 12 Mar 2007 18:13:47 -0000 1.15
+++ CacheAPITest.java 8 Jun 2007 16:26:41 -0000 1.16
@@ -325,4 +325,26 @@
assertEquals(Fqn.ROOT, otherRegion.getFqn());
}
+ public void testStopClearsData() throws Exception
+ {
+ Fqn a = Fqn.fromString("/a");
+ Fqn b = Fqn.fromString("/a/b");
+ String key = "key", value = "value";
+ cache.getRoot().addChild(a).put(key, value);
+ cache.getRoot().addChild(b).put(key, value);
+ cache.getRoot().put(key, value);
+
+ assertEquals(value, cache.getRoot().get(key));
+ assertEquals(value, cache.getRoot().getChild(a).get(key));
+ assertEquals(value, cache.getRoot().getChild(b).get(key));
+
+ cache.stop();
+
+ cache.start();
+
+ assertNull(cache.getRoot().get(key));
+ assertTrue(cache.getRoot().getData().isEmpty());
+ assertTrue(cache.getRoot().getChildren().isEmpty());
+ }
+
}
More information about the jboss-cvs-commits
mailing list