Ejemplo n.º 1
0
 /** 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));
 }
Ejemplo n.º 2
0
 /** Test3 */
 public void testReadThenWrite() {
   assertTrue(lockManager.readLock(tx1, obj, testIsoLevel));
   assertTrue(lockManager.writeLock(tx1, obj, testIsoLevel));
 }
Ejemplo n.º 3
0
 /** Test 2 */
 public void testUpgradeReadLock() {
   assertTrue(lockManager.readLock(tx1, obj, testIsoLevel));
   assertTrue(lockManager.upgradeLock(tx1, obj, testIsoLevel));
 }
Ejemplo n.º 4
0
 /** Test 1 */
 public void testSingleReadLock() {
   assertTrue(lockManager.readLock(tx1, obj, testIsoLevel));
 }
Ejemplo n.º 5
0
 /** Test 15 */
 public void testReleaseReadLock() {
   assertTrue(lockManager.readLock(tx1, obj, testIsoLevel));
   assertTrue(lockManager.releaseLock(tx1, obj));
   assertTrue(lockManager.writeLock(tx2, obj, testIsoLevel));
 }
Ejemplo n.º 6
0
 /** Test 13 */
 public void testReadWithExistingWriter() {
   assertTrue(lockManager.writeLock(tx1, obj, testIsoLevel));
   assertFalse(lockManager.readLock(tx2, obj, testIsoLevel));
 }
Ejemplo n.º 7
0
 /** Test 12 */
 public void testWriteWithMultipleReadersOn1() {
   assertTrue(lockManager.readLock(tx1, obj, testIsoLevel));
   assertTrue(lockManager.readLock(tx2, obj, testIsoLevel));
   assertTrue(lockManager.writeLock(tx1, obj, testIsoLevel));
 }
Ejemplo n.º 8
0
 /** Test 9 */
 public void testUpgradeWithMultipleReaders() {
   assertTrue(lockManager.readLock(tx1, obj, testIsoLevel));
   assertTrue(lockManager.readLock(tx2, obj, testIsoLevel));
   assertTrue(lockManager.upgradeLock(tx2, obj, testIsoLevel));
 }
Ejemplo n.º 9
0
 /** Test 7 */
 public void testUpgradeWithExistingReader() {
   assertTrue(lockManager.readLock(tx1, obj, testIsoLevel));
   assertTrue(lockManager.upgradeLock(tx2, obj, testIsoLevel));
 }
Ejemplo n.º 10
0
 /** Test 6 */
 public void testMultipleReadLock() {
   assertTrue(lockManager.readLock(tx1, obj, testIsoLevel));
   assertTrue(lockManager.readLock(tx2, obj, testIsoLevel));
 }