/** Test 20 */ public void testReadWriteReleaseCheckRead() { assertTrue(lockManager.readLock(tx2, obj, testIsoLevel)); assertTrue(lockManager.writeLock(tx2, obj, testIsoLevel)); assertTrue(lockManager.hasRead(tx2, obj)); assertTrue(lockManager.releaseLock(tx2, obj)); assertFalse(lockManager.hasRead(tx2, obj)); }
/** Test3 */ public void testReadThenWrite() { assertTrue(lockManager.readLock(tx1, obj, testIsoLevel)); assertTrue(lockManager.writeLock(tx1, obj, testIsoLevel)); }
/** Test 2 */ public void testUpgradeReadLock() { assertTrue(lockManager.readLock(tx1, obj, testIsoLevel)); assertTrue(lockManager.upgradeLock(tx1, obj, testIsoLevel)); }
/** Test 1 */ public void testSingleReadLock() { assertTrue(lockManager.readLock(tx1, obj, testIsoLevel)); }
/** Test 15 */ public void testReleaseReadLock() { assertTrue(lockManager.readLock(tx1, obj, testIsoLevel)); assertTrue(lockManager.releaseLock(tx1, obj)); assertTrue(lockManager.writeLock(tx2, obj, testIsoLevel)); }
/** Test 13 */ public void testReadWithExistingWriter() { assertTrue(lockManager.writeLock(tx1, obj, testIsoLevel)); assertFalse(lockManager.readLock(tx2, obj, testIsoLevel)); }
/** Test 12 */ public void testWriteWithMultipleReadersOn1() { assertTrue(lockManager.readLock(tx1, obj, testIsoLevel)); assertTrue(lockManager.readLock(tx2, obj, testIsoLevel)); assertTrue(lockManager.writeLock(tx1, obj, testIsoLevel)); }
/** Test 9 */ public void testUpgradeWithMultipleReaders() { assertTrue(lockManager.readLock(tx1, obj, testIsoLevel)); assertTrue(lockManager.readLock(tx2, obj, testIsoLevel)); assertTrue(lockManager.upgradeLock(tx2, obj, testIsoLevel)); }
/** Test 7 */ public void testUpgradeWithExistingReader() { assertTrue(lockManager.readLock(tx1, obj, testIsoLevel)); assertTrue(lockManager.upgradeLock(tx2, obj, testIsoLevel)); }
/** Test 6 */ public void testMultipleReadLock() { assertTrue(lockManager.readLock(tx1, obj, testIsoLevel)); assertTrue(lockManager.readLock(tx2, obj, testIsoLevel)); }