aljoscha commented on a change in pull request #14078:
URL: https://github.com/apache/flink/pull/14078#discussion_r524098418



##########
File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskMailboxTestHarness.java
##########
@@ -143,12 +143,17 @@ public void waitForTaskCompletion() throws Exception {
                }
        }
 
-       @Override
-       public void close() throws Exception {
-               streamTask.cancel();
-
+       public void finishProcessing() throws Exception {

Review comment:
       It's a bit strange that we replicate the shutdown/cancel logic in the 
TestHarness and don't re-use the production logic. Just noticing it here, it 
was like this before the PR.

##########
File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/SourceOperatorStreamTaskTest.java
##########
@@ -99,6 +102,29 @@ public void testSnapshotAndAdvanceToEndOfEventTime() throws 
Exception {
                }
        }
 
+       @Test
+       public void testEmittingMaxWatermarkAfterReadingAllRecords() throws 
Exception {
+               try (StreamTaskMailboxTestHarness<Integer> testHarness = 
createTestHarness()) {
+                       testHarness.processAll();

Review comment:
       Why is this one needed here and not in the other 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:
[email protected]


Reply via email to