tillrohrmann commented on a change in pull request #13540:
URL: https://github.com/apache/flink/pull/13540#discussion_r500275816



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/dispatcher/DispatcherResourceCleanupTest.java
##########
@@ -350,6 +350,10 @@ public void testJobSubmissionUnderSameJobId() throws 
Exception {
                final TestingJobManagerRunner testingJobManagerRunner = 
jobManagerRunnerFactory.takeCreatedJobManagerRunner();
                testingJobManagerRunner.completeResultFutureExceptionally(new 
JobNotFinishedException(jobId));
 
+               // wait until termination JobManagerRunner closeAsync has been 
called.
+               // this is necessary to avoid race conditions with completion 
of the 1st job and the submission of the 2nd job 
(DuplicateJobSubmissionException).
+               testingJobManagerRunner.getCloseAsyncCalledFuture().get();
+

Review comment:
       Thanks for the clarification @rmetzger. I believe that your analysis is 
correct.




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to