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

 ##########
 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:
   Actually it could be done and I indeed ever considered these parts while 
implementation.
   It might be a separate hotfix commit for refactoring these previous tests 
and I did not want to touch them at that moment in limited time to block 
release. 

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to