You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/09/12 10:11:41 UTC
[GitHub] [flink] XComp commented on a diff in pull request #20811: [FLINK-29253][runtime] Removes synchronous close call from DefaultJobManagerRunnerRegistry#localCleanupAsync
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: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org