You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "reswqa (via GitHub)" <gi...@apache.org> on 2023/03/16 08:58:42 UTC

[GitHub] [flink] reswqa commented on a diff in pull request #22161: [FLINK-31405] Refactor tests to git rid of timeout of CompletableFuture assertions.

reswqa commented on code in PR #22161:
URL: https://github.com/apache/flink/pull/22161#discussion_r1138320340


##########
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/adaptive/AdaptiveSchedulerTest.java:
##########
@@ -1311,11 +1312,10 @@ public void testTriggerSavepointFailsInIllegalState() throws Exception {
                 new AdaptiveSchedulerBuilder(createJobGraph(), mainThreadExecutor)
                         .build(EXECUTOR_RESOURCE.getExecutor());
 
-        assertThat(
+        assertThatFuture(
                         scheduler.triggerSavepoint(
                                 "some directory", false, SavepointFormatType.CANONICAL))
-                .failsWithin(1, TimeUnit.MILLISECONDS)
-                .withThrowableOfType(ExecutionException.class)
+                .eventuallyFailsWith(ExecutionException.class)
                 .withCauseInstanceOf(CheckpointException.class);
     }
 

Review Comment:
   Yes, good catch.



-- 
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-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org