zhijiangW commented on a change in pull request #11351: [FLINK-16404][runtime] 
Avoid caching buffers for blocked input channels before barrier alignment
URL: https://github.com/apache/flink/pull/11351#discussion_r408929085
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTaskTest.java
 ##########
 @@ -464,16 +452,16 @@ public void testOvertakingCheckpointBarriers() throws 
Exception {
                // we should not yet see the barrier, only the two elements 
from non-blocked input
                TestHarnessUtil.assertOutputEquals("Output was not correct.", 
expectedOutput, testHarness.getOutput());
 
-               // Now give a later barrier to all inputs, this should unblock 
the first channel,
-               // thereby allowing the two blocked elements through
-               testHarness.processEvent(new CheckpointBarrier(1, 1, 
CheckpointOptions.forCheckpointWithDefaultLocation()), 0, 0);
+               // Now give a later barrier to all inputs, this should unblock 
the first channel
                testHarness.processEvent(new CheckpointBarrier(1, 1, 
CheckpointOptions.forCheckpointWithDefaultLocation()), 0, 1);
                testHarness.processEvent(new CheckpointBarrier(1, 1, 
CheckpointOptions.forCheckpointWithDefaultLocation()), 1, 0);
                testHarness.processEvent(new CheckpointBarrier(1, 1, 
CheckpointOptions.forCheckpointWithDefaultLocation()), 1, 1);
 
+               // wait until the channel is unblocked
+               testHarness.waitForInputProcessing();
+               testHarness.processEvent(new CheckpointBarrier(1, 1, 
CheckpointOptions.forCheckpointWithDefaultLocation()), 0, 0);
 
 Review comment:
   It should be put before `testHarness.waitForInputProcessing()`

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


With regards,
Apache Git Services

Reply via email to