use of com.hazelcast.client.executor.tasks.FailingCallable in project hazelcast by hazelcast.
the class ClientExecutorServiceTest method testSubmitFailingCallableException_withExecutionCallback.
@Test
public void testSubmitFailingCallableException_withExecutionCallback() throws ExecutionException, InterruptedException {
IExecutorService service = client.getExecutorService(randomString());
final CountDownLatch latch = new CountDownLatch(1);
service.submit(new FailingCallable(), new ExecutionCallback<String>() {
@Override
public void onResponse(String response) {
}
@Override
public void onFailure(Throwable t) {
latch.countDown();
}
});
assertTrue(latch.await(10, TimeUnit.SECONDS));
}
Aggregations