Search in sources :

Example 11 with LeaderTime

use of com.palantir.lock.v2.LeaderTime in project atlasdb by palantir.

the class AsyncLockServiceEteTest method leaderIdFromLockWatchingServiceIsSameAsLeaderClock.

@Test
public void leaderIdFromLockWatchingServiceIsSameAsLeaderClock() {
    LeaderTime leaderTime = service.leaderTime();
    LockWatchStateUpdate lockWatchUpdate = lockWatchingService.getWatchStateUpdate(Optional.empty());
    assertThat(leaderTime.id().id()).isEqualTo(lockWatchUpdate.logId());
}
Also used : LeaderTime(com.palantir.lock.v2.LeaderTime) LockWatchStateUpdate(com.palantir.lock.watch.LockWatchStateUpdate) Test(org.junit.Test)

Aggregations

LeaderTime (com.palantir.lock.v2.LeaderTime)8 Test (org.junit.Test)8 LeaderTimes (com.palantir.atlasdb.timelock.api.LeaderTimes)3 Namespace (com.palantir.atlasdb.timelock.api.Namespace)3 LockToken (com.palantir.lock.v2.LockToken)3 Set (java.util.Set)3 UUID (java.util.UUID)3 ImmutableSet (com.google.common.collect.ImmutableSet)2 LeadershipId (com.palantir.lock.v2.LeadershipId)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1 Sets (com.google.common.collect.Sets)1 AsyncTimelockService (com.palantir.atlasdb.timelock.AsyncTimelockService)1 ConjureLockToken (com.palantir.atlasdb.timelock.api.ConjureLockToken)1 ConjureRefreshLocksRequest (com.palantir.atlasdb.timelock.api.ConjureRefreshLocksRequest)1 ConjureRefreshLocksResponse (com.palantir.atlasdb.timelock.api.ConjureRefreshLocksResponse)1 ConjureStartTransactionsRequest (com.palantir.atlasdb.timelock.api.ConjureStartTransactionsRequest)1 ConjureStartTransactionsResponse (com.palantir.atlasdb.timelock.api.ConjureStartTransactionsResponse)1 ConjureUnlockRequest (com.palantir.atlasdb.timelock.api.ConjureUnlockRequest)1 GetCommitTimestampsRequest (com.palantir.atlasdb.timelock.api.GetCommitTimestampsRequest)1 GetCommitTimestampsResponse (com.palantir.atlasdb.timelock.api.GetCommitTimestampsResponse)1