[jbosscache-commits] JBoss Cache SVN: r4743 - core/trunk/src/test/java/org/jboss/cache/transaction.

jbosscache-commits at lists.jboss.org jbosscache-commits at lists.jboss.org
Fri Nov 9 10:03:06 EST 2007


Author: mircea.markus
Date: 2007-11-09 10:03:06 -0500 (Fri, 09 Nov 2007)
New Revision: 4743

Modified:
   core/trunk/src/test/java/org/jboss/cache/transaction/TransactionTest.java
Log:
updated tests to reflect the fact that removals now create the missing nodes(i.e. also acquire the locks accordingly)

Modified: core/trunk/src/test/java/org/jboss/cache/transaction/TransactionTest.java
===================================================================
--- core/trunk/src/test/java/org/jboss/cache/transaction/TransactionTest.java	2007-11-09 11:47:55 UTC (rev 4742)
+++ core/trunk/src/test/java/org/jboss/cache/transaction/TransactionTest.java	2007-11-09 15:03:06 UTC (rev 4743)
@@ -448,9 +448,13 @@
       // /a/b, /a/b/c should NOT be created!
       GlobalTransaction gtx = cache.getCurrentTransaction();
       assertLocked(gtx, "/", false);
-      assertLocked(gtx, "/a", false);
-      assertNull("/a/b should not exist", cache.peek(Fqn.fromString("/a/b"), true));
-      assertNull("/a/b/c should not exist", cache.peek(Fqn.fromString("/a/b/c"), true));
+      assertLocked(gtx, "/a", true);
+      assertLocked(gtx, "/a/b", true);
+      assertLocked(gtx, "/a/b/c", true);
+      assertNotNull("/a/b should exist", cache.peek(Fqn.fromString("/a/b"), true));
+      assertNotNull("/a/b/c should exist", cache.peek(Fqn.fromString("/a/b/c"), true));
+      assertNotNull("/a/b should NOT be visible", cache.exists(Fqn.fromString("/a/b")));
+      assertNotNull("/a/b/c should NOT be visible", cache.exists(Fqn.fromString("/a/b/c")));
       tx.rollback();
       assertNull("/a/b should not exist", cache.peek(Fqn.fromString("/a/b"), true));
       assertNull("/a/b/c should not exist", cache.peek(Fqn.fromString("/a/b/c"), true));




More information about the jbosscache-commits mailing list