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_r386230094
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/io/network/netty/CreditBasedPartitionRequestClientHandlerTest.java ########## @@ -312,9 +333,17 @@ public void testNotifyCreditAvailable() throws Exception { // The buffer response will take one available buffer from input channel, and it will trigger // requesting (backlog + numExclusiveBuffers - numAvailableBuffers) floating buffers final BufferResponse bufferResponse1 = createBufferResponse( - TestBufferFactory.createBuffer(32), 0, inputChannel1.getInputChannelId(), 1); + TestBufferFactory.createBuffer(32), + 0, + inputChannel1.getInputChannelId(), + 1, + new NetworkBufferAllocator(handler)); final BufferResponse bufferResponse2 = createBufferResponse( - TestBufferFactory.createBuffer(32), 0, inputChannel2.getInputChannelId(), 1); + TestBufferFactory.createBuffer(32), + 0, + inputChannel2.getInputChannelId(), + 1, + new NetworkBufferAllocator(handler)); Review comment: nit : `NetworkBufferAllocator` is created before `try` only once, then all these three `BufferResponse` can reuse it. ---------------------------------------------------------------- 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