@Test public void should_honor_constructor_params() { //given long timeoutValue = 42; //when NonblockingEndpointCompletableFutureTimedOut ex = new NonblockingEndpointCompletableFutureTimedOut(timeoutValue); //then assertThat(ex.timeoutValueMillis, is(timeoutValue)); }
Throwable errorToUse = nonblockingEndpoint.getCustomTimeoutExceptionCause(requestInfo, ctx); if (errorToUse == null) errorToUse = new NonblockingEndpointCompletableFutureTimedOut(timeoutValueToUse); responseFuture.completeExceptionally(errorToUse);
Throwable errorToUse = nonblockingEndpoint.getCustomTimeoutExceptionCause(requestInfo, ctx); if (errorToUse == null) errorToUse = new NonblockingEndpointCompletableFutureTimedOut(timeoutValueToUse); responseFuture.completeExceptionally(errorToUse);
@Test public void shouldHandleNonblockingEndpointCompletableFutureTimedOut() { verifyExceptionHandled(new NonblockingEndpointCompletableFutureTimedOut(4242), singletonError(testProjectApiErrors.getTemporaryServiceProblemApiError())); }