Search in sources :

Example 1 with ShouldRetry

use of com.palantir.flake.ShouldRetry in project atlasdb by palantir.

the class AsyncLockServiceEteTest method timedOutRequestDoesNotHoldLocks.

@Test
@ShouldRetry
public void timedOutRequestDoesNotHoldLocks() {
    LockToken lockBToken = lockSynchronously(REQUEST_1, LOCK_B);
    service.lock(REQUEST_2, descriptors(LOCK_A, LOCK_B), SHORT_TIMEOUT);
    waitForTimeout(SHORT_TIMEOUT);
    assertNotLocked(LOCK_A);
    service.unlock(lockBToken);
    assertNotLocked(LOCK_B);
}
Also used : LockToken(com.palantir.lock.v2.LockToken) Test(org.junit.Test) ShouldRetry(com.palantir.flake.ShouldRetry)

Aggregations

ShouldRetry (com.palantir.flake.ShouldRetry)1 LockToken (com.palantir.lock.v2.LockToken)1 Test (org.junit.Test)1