wangzzu commented on code in PR #23242:
URL: https://github.com/apache/flink/pull/23242#discussion_r1301148961


##########
flink-runtime/src/test/java/org/apache/flink/runtime/rest/RestClientTest.java:
##########
@@ -226,16 +228,20 @@ public void testCloseClientBeforeRequest() throws 
Exception {
                             EmptyMessageParameters.getInstance(),
                             EmptyRequestBody.getInstance());
 
-            FlinkAssertions.assertThatFuture(future)
-                    .eventuallyFailsWith(ExecutionException.class)
+            // 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
+            assertThatFuture(future)
+                    .isCompletedExceptionally()
+                    .failsWithin(0, TimeUnit.SECONDS)
+                    .withThrowableOfType(ExecutionException.class)
                     .withCauseInstanceOf(IllegalStateException.class)
-                    .extracting(Throwable::getCause, as(THROWABLE))
-                    .hasMessage("RestClient is already closed");
+                    .withMessageContaining("RestClient is already closed");

Review Comment:
   What does this refer to?



-- 
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

Reply via email to