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


##########
flink-clients/src/test/java/org/apache/flink/client/deployment/application/ApplicationDispatcherBootstrapTest.java:
##########
@@ -348,6 +350,13 @@ void testApplicationIsStoppedWhenStoppingBootstrap() 
throws Exception {
 
         bootstrap.stop();
 
+        // EmbeddedExecutor calls getJobStatus after the job is submitted in a 
busy-waiting loop to
+        // wait for the job to pass the initialization phase. Only then, a 
JobClient is returned
+        // which finalizes the job submission. Completing the 
getJobStatusFuture after calling
+        // ApplicationDispatcherBootstrap#stop ensures that the 
applicationExecutionFuture doesn't
+        // complete before ApplicationDispatcherBootstrap#stop is called
+        getJobStatusFuture.complete(JobStatus.RUNNING);

Review Comment:
   You have a point. I went through the process once more and found a solution 
that's even closer to the `ApplicationDispatcherBootstrap` implementation. We 
can utilize the `ManuallyTriggeredScheduledExecutor` to trigger the bootstrap 
execution task.



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