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


##########
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:
   This seems to rely on very particular behavior of the embedded executor.
   
   Can we achieve the same by delaying the acknowledgement of the job 
submission? That'd seem more intuitive to me.



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