* locker2: => blocked
* locker3: => blocked
*/
@Test
public void testUpgradeWaiterConflictTimesOut() throws Exception {
Transaction txn = new DummyTransaction();
locker = createTxnLocker(lockManager, txn, 0);
assertGranted(acquireLock(locker, "o1", false));
Locker<String> locker2 = createLocker(lockManager);
assertGranted(acquireLock(locker2, "o1", false));
Locker<String> locker3 = createTxnLocker(
lockManager, new DummyTransaction(txn.getTimeout() / 3), 0);
AcquireLock acquire3 = new AcquireLock(locker3, "o1", true);
acquire3.assertBlocked();
AcquireLock acquire2 = new AcquireLock(locker2, "o1", true);
acquire2.assertBlocked();
lockManager.releaseLock(locker, "o1");
acquire2.assertBlocked();
acquire3.assertBlocked();
Thread.sleep(txn.getTimeout() / 2);
assertTimeout(acquire3.getResult(), locker2);
assertGranted(acquire2.getResult());
}