add default
This commit is contained in:
parent
05f4487d63
commit
92d038dc3c
|
@ -81,4 +81,16 @@ class CompletableFutureTimeoutUnitTest {
|
||||||
assertThrows(ExecutionException.class, completableFuture::get);
|
assertThrows(ExecutionException.class, completableFuture::get);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void whencompletableDefault_thenGetReturn() {
|
||||||
|
CompletableFuture<Integer> completableFuture = createDummyRequest();
|
||||||
|
try {
|
||||||
|
int result = completableFuture.get();
|
||||||
|
assertEquals(TIMEOUT_STATUS_CODE, result);
|
||||||
|
} catch (InterruptedException | ExecutionException e) {
|
||||||
|
//System.out.println("ERROR->"+e.getMessage());
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue