rkhachatryan commented on a change in pull request #14052:
URL: https://github.com/apache/flink/pull/14052#discussion_r524417953



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/RemoteInputChannelTest.java
##########
@@ -1125,70 +1127,137 @@ public void testUnblockReleasedChannel() throws 
Exception {
 
        @Test
        public void testPrioritySequenceNumbers() throws Exception {
-               final NetworkBufferPool networkBufferPool = new 
NetworkBufferPool(4, 4096);
-               SingleInputGate inputGate = new SingleInputGateBuilder()
-                       
.setChannelFactory(InputChannelBuilder::buildRemoteChannel)
-                       
.setBufferPoolFactory(networkBufferPool.createBufferPool(1, 4))
-                       .setSegmentProvider(networkBufferPool)
-                       .build();
-               final RemoteInputChannel channel = (RemoteInputChannel) 
inputGate.getChannel(0);
-               inputGate.setup();
-               inputGate.requestPartitions();
+               final RemoteInputChannel channel = 
buildInputGateAndGetChannel();
+               sendBuffersAndBarrier(channel, 0);

Review comment:
       I agree that this change doesn't make this test more readable.
   But if you consider other tests, they have the same logic. Thus, it's easier 
to understand them if this logic is extracted.
   If you insist I can inline these steps (`sendXxx`).




----------------------------------------------------------------
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:
[email protected]


Reply via email to