rkhachatryan commented on a change in pull request #14968:
URL: https://github.com/apache/flink/pull/14968#discussion_r579455378
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/SourceStreamTaskTest.java
##########
@@ -856,4 +887,41 @@ private void output(String record) {
output.collect(new StreamRecord<>(record));
}
}
+
+ /**
+ * This source sleeps a little bit before processing cancellation and
records whether it was
+ * interrupted by the {@link SourceStreamTask} or not.
+ */
+ private static class WasInterruptedTestingSource implements
SourceFunction<String> {
+ private static final int MAX_POST_CANCEL_ITERATIONS = 100;
+ private static final long serialVersionUID = 1L;
+ private volatile boolean running;
Review comment:
Shouldn't this flag be set to `true` by default?
I guess currently test only catches the bug because of
`postCancelIterations`.
----------------------------------------------------------------
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]