NicoK commented on a change in pull request #9132: [FLINK-13245][network] Fix
the bug of file resource leak while canceling partition request
URL: https://github.com/apache/flink/pull/9132#discussion_r306736284
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/PartitionTestUtils.java
##########
@@ -158,4 +159,11 @@ public ResultPartitionID getResultPartitionID() {
true,
releaseType);
}
+
+ public static void writeBuffers(ResultPartition partition, int
numberOfBuffers, int bufferSize) throws IOException {
+ for (int i = 0; i < numberOfBuffers; i++) {
+
partition.addBufferConsumer(createFilledBufferConsumer(bufferSize, bufferSize),
0);
+ }
+ partition.finish();
+ }
Review comment:
If this is added here, I'm wondering, whether we should also de-duplicate
these two into this utility class:
`BoundedBlockingSubpartitionAvailabilityTest#writeBuffers` and
`FileChannelBoundedDataTest#writeBuffers(org.apache.flink.runtime.io.network.partition.ResultSubpartition,
int)`
----------------------------------------------------------------
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