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_r385521035
########## 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), Review comment: Mock is not suggested, so we can bypass this component which is actually not used in tests. ---------------------------------------------------------------- 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