zentol commented on code in PR #23180: URL: https://github.com/apache/flink/pull/23180#discussion_r1294413516
########## flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestClientTest.java: ########## @@ -239,11 +230,12 @@ public void testCloseClientBeforeRequest() throws Exception { // Call get() on the future with a timeout of 0s so we can test that the exception // thrown is not a TimeoutException, which is what would be thrown if restClient were // not already closed - final ThrowingRunnable getFuture = () -> future.get(0, TimeUnit.SECONDS); - - final Throwable cause = assertThrows(ExecutionException.class, getFuture).getCause(); - assertThat(cause, instanceOf(IllegalStateException.class)); - assertThat(cause.getMessage(), equalTo("RestClient is already closed")); + assertThat(future) + .failsWithin(Duration.ZERO) Review Comment: > I guess you're referring to FlinkAssertions.chainOfCauses and its related utility methods? I was referring to `FlinkAssertions#assertThatFuture(...).eventuallyFailsWith(...).hasMessage(...)` > And we have to ensure that the timeout is set to 0. Why? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org