XComp commented on code in PR #20811:
URL: https://github.com/apache/flink/pull/20811#discussion_r968231029


##########
flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DefaultJobManagerRunnerRegistryTest.java:
##########
@@ -200,14 +197,36 @@ public void testFailingLocalCleanupAsync() throws 
Exception {
                 .failsWithin(Duration.ZERO)
                 .withThrowableOfType(ExecutionException.class)
                 .extracting(FlinkAssertions::chainOfCauses, 
FlinkAssertions.STREAM_THROWABLE)
-                .hasExactlyElementsOfTypes(
-                        ExecutionException.class,
-                        FlinkException.class,
-                        expectedException.getClass())
+                .hasExactlyElementsOfTypes(ExecutionException.class, 
expectedException.getClass())
                 .last()
                 .isEqualTo(expectedException);
     }
 
+    @Test
+    public void testLocalCleanupAsyncNonBlocking() {
+        final TestingJobManagerRunner jobManagerRunner =
+                
TestingJobManagerRunner.newBuilder().setBlockingTermination(true).build();
+        testInstance.register(jobManagerRunner);
+
+        // this call would block
+        final CompletableFuture<Void> cleanupFuture =
+                Assertions.assertTimeoutPreemptively(
+                        Duration.ofMinutes(10),
+                        () ->
+                                testInstance.localCleanupAsync(
+                                        jobManagerRunner.getJobID(),
+                                        
java.util.concurrent.Executors.newSingleThreadExecutor()),

Review Comment:
   Yeah, true... it's not getting used. I had some other test implementation in 
mind when adding the `SingleThreadExecutor`. :facepalm: Good catch :+1: 



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to