rkhachatryan commented on a change in pull request #13351:
URL: https://github.com/apache/flink/pull/13351#discussion_r499694551



##########
File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskMultipleInputSelectiveReadingTest.java
##########
@@ -197,22 +198,21 @@ public void testInputStarvation() throws Exception {
                        testHarness.processElement(new StreamRecord<>("3"), 1);
                        testHarness.processElement(new StreamRecord<>("4"), 1);
 
-                       testHarness.processSingleStep();
                        expectedOutput.add(new StreamRecord<>("[2]: 1"));
-                       testHarness.processSingleStep();
                        expectedOutput.add(new StreamRecord<>("[2]: 2"));
-                       assertThat(testHarness.getOutput(), 
contains(expectedOutput.toArray()));
+                       testHarness.processAll();
+                       assertEquals(expectedOutput, new 
ArrayList<>(testHarness.getOutput()).subList(0, expectedOutput.size()));

Review comment:
       Thanks for the explanation.
   The problem was that the output didn't match the expected one. The reason 
was that requesting partitions now also requires a mailbox step. 
   After your comment I replaced the fix with:
   ```
   for (int i = 0; i < testHarness.inputGates.length; i++) {
        testHarness.processSingleStep();
   }
   ```
   Does it look good to you?




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