reswqa commented on code in PR #25738:
URL: https://github.com/apache/flink/pull/25738#discussion_r1879253730
##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/PartitionedFileWriteReadTest.java:
##########
@@ -116,6 +121,140 @@ void testWriteAndReadPartitionedFile() throws Exception {
}
}
+ @ParameterizedTest
+ @CsvSource({"true", "false"})
+ void testComputeReadablePosition(boolean broadcastRegion) throws
IOException {
+ int numSubpartitions = 10;
+ int bufferSize = 1024;
+ int numBuffers = 1000;
+ int numRegions = 1;
+
+ List<Buffer>[] buffersWritten = new List[numSubpartitions];
+ List<Buffer>[] buffersRead = new List[numSubpartitions];
+ List<Tuple2<Long, Long>>[] regionStat = new List[numSubpartitions];
+ for (int subpartition = 0; subpartition < numSubpartitions;
++subpartition) {
+ buffersWritten[subpartition] = new ArrayList<>();
+ buffersRead[subpartition] = new ArrayList<>();
+ regionStat[subpartition] = new ArrayList<>();
+ }
+
+ int[] writeOrder =
DataBufferTest.getRandomSubpartitionOrder(numSubpartitions);
Review Comment:
In the case of boundaries, we may need to test manually. For example:
[0,1,2,3,....,sp-1]?
--
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]