dmvk commented on a change in pull request #17000:
URL: https://github.com/apache/flink/pull/17000#discussion_r700122463



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
##########
@@ -451,12 +451,23 @@ private void setupDispatcherResourceManagerComponents(
             final CompletableFuture<ApplicationStatus> shutDownFuture =
                     dispatcherResourceManagerComponent.getShutDownFuture();
             FutureUtils.assertNoException(
-                    
shutDownFuture.thenRun(dispatcherResourceManagerComponent::closeAsync));
+                    shutDownFuture
+                            .handle(
+                                    (applicationStatus, exception) -> {
+                                        if (exception != null) {
+                                            return 
dispatcherResourceManagerComponent
+                                                    .stopApplication(
+                                                            
ApplicationStatus.UNKNOWN,
+                                                            
ExceptionUtils.stringifyException(
+                                                                    
exception));

Review comment:
       oh, this is a leftover from the previous approach. I think we currently 
never complete shutdownFuture exceptionally, so we can safely ignore this and 
let the `assertNoException` take care of it in case it happens 👍 




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