becketqin commented on a change in pull request #14239:
URL: https://github.com/apache/flink/pull/14239#discussion_r531331794



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/source/coordinator/SourceCoordinatorContextTest.java
##########
@@ -170,6 +178,70 @@ public void testSnapshotAndRestore() throws Exception {
 
        }
 
+       @Test
+       public void testCallableInterruptedDuringShutdownDoNotFailJob() throws 
InterruptedException {

Review comment:
       Very good suggestion! This works quite well.
   
   I was actually struggling on this test a little bit. The tricky part is that 
`testingContext.close()` also closes the two executors. So it is not guaranteed 
that the error handling logic is actually tested every time the test runs. The 
`ManuallyTriggeredScheduledExecutorService` works well in this case because 
`triggerAll()` will still fire even after the executor has shutdown. It is 
probably not the generally correct behavior, but really helps in this 
particular test :)




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to