gaoyunhaii commented on a change in pull request #16366:
URL: https://github.com/apache/flink/pull/16366#discussion_r666220859
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/PipelinedSubpartitionWithReadViewTest.java
##########
@@ -487,42 +487,61 @@ private void
testBacklogConsistentWithNumberOfConsumableBuffers(
}
@Test
- public void testBlockedByCheckpointAndResumeConsumption()
- throws IOException, InterruptedException {
+ public void testResumeBlockedSubpartitionWithEvents() throws IOException,
InterruptedException {
blockSubpartitionByCheckpoint(1);
// add an event after subpartition blocked
subpartition.add(createEventBufferConsumer(BUFFER_SIZE,
Buffer.DataType.EVENT_BUFFER));
// no data available notification after adding an event
checkNumNotificationsAndAvailability(1);
+ // Resumption will make the subpartition available.
resumeConsumptionAndCheckAvailability(0, true);
assertNextEvent(readView, BUFFER_SIZE, null, false, 0, false, true);
+ }
- blockSubpartitionByCheckpoint(2);
+ @Test
+ public void testResumeBlockedSubpartitionWithUnfinishedBuffer()
+ throws IOException, InterruptedException {
+ blockSubpartitionByCheckpoint(1);
// add a buffer and flush the subpartition
subpartition.add(createFilledFinishedBufferConsumer(BUFFER_SIZE));
subpartition.flush();
// no data available notification after adding a buffer and flushing
the subpartition
- checkNumNotificationsAndAvailability(2);
+ checkNumNotificationsAndAvailability(1);
- resumeConsumptionAndCheckAvailability(Integer.MAX_VALUE, false);
+ // Resumption will make the subpartition available.
+ resumeConsumptionAndCheckAvailability(Integer.MAX_VALUE, true);
Review comment:
The test is indeed missed, I'll add one for this case~
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]