lometheus commented on a change in pull request #17024:
URL: https://github.com/apache/flink/pull/17024#discussion_r699310015
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/ResultPartitionTest.java
##########
@@ -692,6 +692,17 @@ public void testDifferentBufferSizeForSubpartitions()
throws IOException {
assertEquals(12, subpartition0.pollBuffer().buffer().getSize());
assertEquals(5, subpartition1.pollBuffer().buffer().getSize());
assertEquals(4, subpartition1.pollBuffer().buffer().getSize());
+
+ // when: Set the different buffers size.
+ subpartition0.bufferSize(12);
+ subpartition1.bufferSize(5);
+
+ // and: Add the buffer.
+ bufferWritingResultPartition.broadcastRecord(ByteBuffer.allocate(5));
+
+ // then: The buffer less or equal to configured.
+ assertEquals(5, subpartition0.pollBuffer().buffer().getSize());
+ assertEquals(5, subpartition1.pollBuffer().buffer().getSize());
Review comment:
I add testDynamicBufferSizeForBroadcast for less/greater/equal 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]