[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/lock ...
Manik Surtani
msurtani at jboss.com
Fri Nov 24 12:58:49 EST 2006
User: msurtani
Date: 06/11/24 12:58:49
Modified: tests/functional/org/jboss/cache/lock Tag:
Branch_JBossCache_1_3_0 UpgradeLockTest.java
LockReleaseTest.java
Log:
Updated to reflect the number of locks that *should* be acquired
Revision Changes Path
No revision
No revision
1.1.16.1 +2 -2 JBossCache/tests/functional/org/jboss/cache/lock/UpgradeLockTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: UpgradeLockTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/lock/UpgradeLockTest.java,v
retrieving revision 1.1
retrieving revision 1.1.16.1
diff -u -b -r1.1 -r1.1.16.1
--- UpgradeLockTest.java 8 Jul 2005 05:58:11 -0000 1.1
+++ UpgradeLockTest.java 24 Nov 2006 17:58:49 -0000 1.1.16.1
@@ -25,7 +25,7 @@
* Tests upgrade locks from read -> write
*
* @author Bela Ban
- * @version $Id: UpgradeLockTest.java,v 1.1 2005/07/08 05:58:11 msurtani Exp $
+ * @version $Id: UpgradeLockTest.java,v 1.1.16.1 2006/11/24 17:58:49 msurtani Exp $
*/
public class UpgradeLockTest extends TestCase {
TreeCache cache=null;
@@ -124,7 +124,7 @@
cache=createCache(l);
tx.begin();
- int expected_num_locks=l == IsolationLevel.NONE? 0 : 1;
+ int expected_num_locks=l == IsolationLevel.NONE? 0 : 2;
cache.put(NODE1, null);
assertEquals(expected_num_locks, cache.getNumberOfLocksHeld());
1.1.16.1 +12 -12 JBossCache/tests/functional/org/jboss/cache/lock/LockReleaseTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: LockReleaseTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/lock/LockReleaseTest.java,v
retrieving revision 1.1
retrieving revision 1.1.16.1
diff -u -b -r1.1 -r1.1.16.1
--- LockReleaseTest.java 8 Jul 2005 05:58:11 -0000 1.1
+++ LockReleaseTest.java 24 Nov 2006 17:58:49 -0000 1.1.16.1
@@ -27,7 +27,7 @@
* Verifies that there are no read locks held when a transaction ends.
*
* @author Bela Ban
- * @version $Id: LockReleaseTest.java,v 1.1 2005/07/08 05:58:11 msurtani Exp $
+ * @version $Id: LockReleaseTest.java,v 1.1.16.1 2006/11/24 17:58:49 msurtani Exp $
*/
public class LockReleaseTest extends TestCase {
TreeCache cache=null;
@@ -142,11 +142,11 @@
tx.begin();
keys=cache.getKeys(NODE1);
- assertEquals("we should hold 1 read locks now: ", 1, cache.getNumberOfLocksHeld());
+ assertEquals("we should hold 2 read locks now: ", 2, cache.getNumberOfLocksHeld());
keys=cache.getKeys(NODE2);
- assertEquals("we should hold 3 read locks now: ", 3, cache.getNumberOfLocksHeld());
+ assertEquals("we should hold 4 read locks now: ", 4, cache.getNumberOfLocksHeld());
tx.commit();
- assertEquals("we should have released all 3 read locks: ", 0, cache.getNumberOfLocksHeld());
+ assertEquals("we should have released all 4 read locks: ", 0, cache.getNumberOfLocksHeld());
}
@@ -164,11 +164,11 @@
tx.begin();
keys=cache.getChildrenNames(NODE1);
- assertEquals("we should hold 1 read locks now: ", 1, cache.getNumberOfLocksHeld());
+ assertEquals("we should hold 2 read locks now: ", 2, cache.getNumberOfLocksHeld());
keys=cache.getChildrenNames(NODE2);
- assertEquals("we should hold 3 read locks now: ", 3, cache.getNumberOfLocksHeld());
+ assertEquals("we should hold 4 read locks now: ", 4, cache.getNumberOfLocksHeld());
tx.commit();
- assertEquals("we should have released all 3 read locks: ", 0, cache.getNumberOfLocksHeld());
+ assertEquals("we should have released all 4 read locks: ", 0, cache.getNumberOfLocksHeld());
}
public void testPrint() throws Exception {
@@ -183,11 +183,11 @@
tx.begin();
cache.print(NODE1);
- assertEquals("we should hold 1 read locks now (for print()): ", 1, cache.getNumberOfLocksHeld());
+ assertEquals("we should hold 2 read locks now (for print()): ", 2, cache.getNumberOfLocksHeld());
cache.print(NODE2);
- assertEquals("we should hold 3 read locks now (for print()): ", 3, cache.getNumberOfLocksHeld());
+ assertEquals("we should hold 4 read locks now (for print()): ", 4, cache.getNumberOfLocksHeld());
tx.commit();
- assertEquals("we should have released all 3 read locks: ", 0, cache.getNumberOfLocksHeld());
+ assertEquals("we should have released all 4 read locks: ", 0, cache.getNumberOfLocksHeld());
}
@@ -202,7 +202,7 @@
tx.begin();
assertEquals(VAL1, cache.get(NODE1, KEY));
assertEquals(VAL1, cache.get(NODE2, KEY));
- assertEquals("we should hold 3 read locks now: ", 3, cache.getNumberOfLocksHeld());
+ assertEquals("we should hold 4 read locks now (incl root): ", 4, cache.getNumberOfLocksHeld());
tx.commit();
assertEquals("we should have released all 3 read locks: ", 0, cache.getNumberOfLocksHeld());
}
@@ -218,7 +218,7 @@
tx.begin();
cache.put(NODE1, KEY, VAL1);
cache.put(NODE2, KEY, VAL1);
- assertEquals("we should hold 3 write locks now: ", 3, cache.getNumberOfLocksHeld());
+ assertEquals("we should hold 4 locks now (incl root): ", 4, cache.getNumberOfLocksHeld());
tx.commit();
assertEquals("we should have released all 3 write locks: ", 0, cache.getNumberOfLocksHeld());
}
More information about the jboss-cvs-commits
mailing list