use of io.etcd.jetcd.lock.LockResponse in project jetcd by coreos.
the class LockTest method testLockWithNotExistingLease.
@ParameterizedTest
@MethodSource("parameters")
public void testLockWithNotExistingLease(boolean useNamespace) {
Throwable exception = assertThrows(ExecutionException.class, () -> {
initializeLockCLient(useNamespace);
CompletableFuture<LockResponse> feature = lockClient.lock(SAMPLE_NAME, 123456);
LockResponse response = feature.get();
locksToRelease.add(response.getKey());
});
assertThat(exception.getMessage().contains("etcdserver: requested lease not found")).isTrue();
}
Aggregations