XComp commented on code in PR #22548:
URL: https://github.com/apache/flink/pull/22548#discussion_r1189818630
##########
flink-test-utils-parent/flink-test-utils-junit/src/main/java/org/apache/flink/testutils/executor/TestExecutorExtension.java:
##########
@@ -47,8 +58,26 @@ public T getExecutor() {
@Override
public void afterAll(ExtensionContext context) throws Exception {
+ gracefulShutdown(executorService, LOG);
+ }
+
+ static void gracefulShutdown(@Nullable ExecutorService executorService,
Logger logger) {
Review Comment:
Good point. The rational behind this change was trying to make sure that any
resources (that are handled by the threads) are actually cleaned up. What do
you think about calling `shutdownNow` and failing with an `AssertionError` if
there are still `Runnables` that have been processed by the executor? That way,
we force everyone to handle hanging threads within the test implementation
:thinking:
--
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]