use of com.hazelcast.spi.impl.operationservice.impl.CompletableFutureTestUtil in project hazelcast by hazelcast.
the class CompletableFutureAbstractTest method thenRunAsync_exceptional.
@Test
public void thenRunAsync_exceptional() {
CompletableFuture<Object> future = newCompletableFuture(true, 1000L);
CompletableFuture<Void> chained = future.thenRunAsync(CompletableFutureTestUtil::ignore);
assertTrueEventually(() -> assertTrue(chained.isDone()));
assertTrue(chained.isCompletedExceptionally());
expectedException.expect(CompletionException.class);
expectedException.expectCause(new RootCauseMatcher(ExpectedRuntimeException.class));
chained.join();
}
use of com.hazelcast.spi.impl.operationservice.impl.CompletableFutureTestUtil in project hazelcast by hazelcast.
the class CompletableFutureAbstractTest method thenRun_exceptional.
@Test
public void thenRun_exceptional() {
CompletableFuture<Object> future = newCompletableFuture(true, 0L);
CompletableFuture<Void> chained = future.thenRun(CompletableFutureTestUtil::ignore);
assertTrueEventually(() -> assertTrue(chained.isDone()));
assertTrue(chained.isCompletedExceptionally());
expectedException.expect(CompletionException.class);
expectedException.expectCause(new RootCauseMatcher(ExpectedRuntimeException.class));
chained.join();
}
Aggregations