rmetzger opened a new pull request #13540:
URL: https://github.com/apache/flink/pull/13540


   
   ## What is the purpose of the change
   
   This is removing a test-instability, where sometimes, the 
DispatcherResourceCleanupTest. testJobSubmissionUnderSameJobId() would report a 
`DuplicateJobSubmissionException`. 
   The test is initialized with a dispatcher, recovering the testing job graph. 
Once the TestingJobManagerRunner for this job graph has been created, the 
result future is completed, and a new job gets submitted.
   The problem is that the `DispatcherJob.isDuplicateJob()` method might still 
find the job in the `runningJobs` list, because the cleanup from that list 
happens asynchronously.
   
   The test instability is resolved by waiting until TestingJobManagerRunner 
has been closed.
   
   
   
   ## Verifying this change
   
   I have executed this patch 4000 times on CI, without a failure: 
https://dev.azure.com/rmetzger/Flink/_build/results?buildId=8421&view=results
   
   ## Does this pull request potentially affect one of the following parts:
   
   The change only affects tests.
   


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