zhijiangW commented on a change in pull request #7368: [FLINK-10742][network] 
Let Netty use Flink's buffers directly in credit-based mode
URL: https://github.com/apache/flink/pull/7368#discussion_r385521186
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/netty/NettyMessageClientSideSerializationTest.java
 ##########
 @@ -81,11 +95,47 @@
                });
        }
 
-       public NettyMessageSerializationTest(boolean testReadOnlyBuffer, 
boolean testCompressedBuffer) {
+       public NettyMessageClientSideSerializationTest(boolean 
testReadOnlyBuffer, boolean testCompressedBuffer) {
                this.testReadOnlyBuffer = testReadOnlyBuffer;
                this.testCompressedBuffer = testCompressedBuffer;
        }
 
+       @Before
+       public void setup() throws IOException, InterruptedException {
+               networkBufferPool = new NetworkBufferPool(10, 1024, 2);
+               BufferPool bufferPool = networkBufferPool.createBufferPool(8, 
8);
+
+               inputGate = new SingleInputGateBuilder()
+                       .setNumberOfChannels(1)
+                       .setBufferPoolFactory(bufferPool)
+                       .build();
+               inputChannel = createRemoteInputChannel(
+                       inputGate,
+                       mock(PartitionRequestClient.class),
+                       networkBufferPool);
+               inputGate.assignExclusiveSegments();
+               inputChannel.requestSubpartition(0);
 
 Review comment:
   I guess this is not necessary because the input channel would be added into 
handler explicitly below

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