pnowojski commented on a change in pull request #12714:
URL: https://github.com/apache/flink/pull/12714#discussion_r443499682
##########
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:
Hmm.
> extracted SourceStreamTask.LegacySourceFunctionRunner interface in a
preceding hotfix commit.
this commit is not super pretty, maybe we could make it a bit better, but
I'm not sure if that's the right direction.
> SourceStreamTaskTest.testWatForCancelCompletion
this doesn't seem to be testing much, it's almost a no-op test for passing
the returned value of one getter. It's definitely not testing for the reported
bug.
What about creating a mock source that waits on a latch in a loop ignoring
interrupts and the test thread fires cancellation & ensures task is not
completed? Setup should be quite easy like in
`SourceStreamTaskTest#finishingIgnoresExceptions`? What do you think?
----------------------------------------------------------------
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]