use of com.palantir.atlasdb.timelock.api.ConjureUnlockRequest in project atlasdb by palantir.
the class LockLeaseServiceTest method before.
@Before
public void before() {
when(lockRequest.getAcquireTimeoutMs()).thenReturn(10L);
when(timelock.leaderTime()).thenAnswer(inv -> LeaderTime.of(LEADER_ID, time.get()));
when(timelock.unlock(any())).thenAnswer(inv -> {
ConjureUnlockRequest request = inv.getArgument(0);
return ConjureUnlockResponse.of(request.getTokens());
});
lockLeaseService = new LockLeaseService(timelock, SERVICE_ID, new LegacyLeaderTimeGetter(timelock));
}
Aggregations