[jboss-cvs] JBossCache/tests-50/functional/org/jboss/cache/pojo/optimistic ...
Ben Wang
bwang at jboss.com
Wed Jan 10 02:30:47 EST 2007
User: bwang
Date: 07/01/10 02:30:47
Modified: tests-50/functional/org/jboss/cache/pojo/optimistic
LocalTxTest.java
Log:
optimisitic failure.
Revision Changes Path
1.5 +24 -0 JBossCache/tests-50/functional/org/jboss/cache/pojo/optimistic/LocalTxTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LocalTxTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests-50/functional/org/jboss/cache/pojo/optimistic/LocalTxTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- LocalTxTest.java 10 Jan 2007 06:11:27 -0000 1.4
+++ LocalTxTest.java 10 Jan 2007 07:30:47 -0000 1.5
@@ -151,6 +151,30 @@
tx.commit();
}
+ public void testFailure2() throws Exception
+ {
+ org.jboss.cache.Fqn f0 = new org.jboss.cache.Fqn("/person/test");
+ org.jboss.cache.Fqn f1 = new org.jboss.cache.Fqn(f0, "1");
+ org.jboss.cache.Fqn f2 = new org.jboss.cache.Fqn(f0, "2");
+ cache.getCache().put(f1, "test", "test");
+ cache.getCache().put(f2, "test", "test");
+ int size = org.jboss.cache.pojo.util.CacheApiUtil.getNodeChildren(
+ (org.jboss.cache.CacheSPI)cache.getCache(), f0).size();
+ assertEquals("Size ", 2, size);
+
+ UserTransaction tx = getTransaction();
+ tx.begin();
+ cache.getCache().removeNode(f1);
+ size = org.jboss.cache.pojo.util.CacheApiUtil.getNodeChildren(
+ (org.jboss.cache.CacheSPI)cache.getCache(), f0).size();
+ assertEquals("Size ", 1, size);
+ cache.getCache().put(f1, "test", "test");
+ size = org.jboss.cache.pojo.util.CacheApiUtil.getNodeChildren(
+ (org.jboss.cache.CacheSPI)cache.getCache(), f0).size();
+ assertEquals("Size ", 2, size);
+ tx.commit();
+ }
+
public void testModification() throws Exception
{
UserTransaction tx = getTransaction();
More information about the jboss-cvs-commits
mailing list