pnowojski commented on a change in pull request #12714:
URL: https://github.com/apache/flink/pull/12714#discussion_r458176824



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/taskmanager/TaskTest.java
##########
@@ -139,6 +142,33 @@ public void testRegularExecution() throws Exception {
                
taskManagerActions.validateListenerMessage(ExecutionState.FINISHED, task, null);
        }
 
+       @Test
+       public void testTaskTerminatesOnlyAfterInvokable() throws Exception {

Review comment:
       I meant that source thread, running mock source, would be waiting on the 
latch (with some timeout), not the test thread. Test thread would:
   1. trigger cancellation
   2. maybe wait 10ms 
   3. assert source task's thread hasn't completed
   4 release the latch
   5. assert that source task has completed (with a timeout) 
   
   > It provides only partial coverage because it doesn't cover integration 
with Task, StreamTask and the code that actually unloads the classes. So in 
terms of coverage, it's equivalent to a set of unit tests.
   
   It would provide a coverage for task thread shutting down prematurely, 
before source thread completes.




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