[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/optimistic ...
Manik Surtani
manik at jboss.org
Mon Mar 12 15:07:47 EDT 2007
User: msurtani
Date: 07/03/12 15:07:47
Modified: tests/functional/org/jboss/cache/optimistic Tag:
Branch_JBossCache_1_4_0 CacheTest.java
Log:
JBCACHE-1006
Revision Changes Path
No revision
No revision
1.17.2.3 +30 -0 JBossCache/tests/functional/org/jboss/cache/optimistic/CacheTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/CacheTest.java,v
retrieving revision 1.17.2.2
retrieving revision 1.17.2.3
diff -u -b -r1.17.2.2 -r1.17.2.3
--- CacheTest.java 28 Feb 2007 10:58:42 -0000 1.17.2.2
+++ CacheTest.java 12 Mar 2007 19:07:47 -0000 1.17.2.3
@@ -12,6 +12,7 @@
import org.jboss.cache.OptimisticTransactionEntry;
import org.jboss.cache.TransactionTable;
import org.jboss.cache.TreeCache;
+import org.jboss.cache.config.Option;
import org.jboss.cache.interceptors.Interceptor;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.interceptors.OptimisticNodeInterceptor;
@@ -33,6 +34,7 @@
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.List;
+import java.util.HashMap;
/**
* Tests cache operations on optimistic cache
@@ -549,5 +551,33 @@
assertEquals("test2", cache.get(f1, "test2"));
assertEquals(2, cache.get(f).getChildren().size());
+ destroyCache(cache);
+ }
+
+ public void testRemoveChildAfterRemoveParent() throws Exception
+ {
+ TreeCache c = createCache();
+ TransactionManager tm = c.getTransactionManager();
+ c.put(Fqn.fromString("/a/b"), "k", "v");
+ tm.begin();
+ c.remove(Fqn.fromString("/a"));
+ c.remove(Fqn.fromString("/a/b"));
+ tm.commit();
+
+ destroyCache(c);
}
+
+ public void testAddChildAfterRemoveParent() throws Exception
+ {
+ TreeCache c = createCache();
+ TransactionManager tm = c.getTransactionManager();
+ c.put(Fqn.fromString("/a/b"), "k", "v");
+ tm.begin();
+ c.remove(Fqn.fromString("/a"));
+ c.put(Fqn.fromString("/a/b"), "k", "v");
+ tm.commit();
+
+ destroyCache(c);
+ }
+
}
More information about the jboss-cvs-commits
mailing list