zhijiangW commented on a change in pull request #8181: [FLINK-12199][network] 
Refactor IOMetrics to not distinguish between local/remote in/out bytes
URL: https://github.com/apache/flink/pull/8181#discussion_r278610383
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/InputChannelTestUtils.java
 ##########
 @@ -93,6 +98,62 @@ public static ConnectionManager 
createDummyConnectionManager() throws Exception
                return connManager;
        }
 
+       public static LocalInputChannel createLocalInputChannel(
+               SingleInputGate inputGate,
+               ResultPartitionManager partitionManager) {
+
+               return createLocalInputChannel(inputGate, partitionManager, new 
Tuple2<>(0, 0));
+       }
+
+       public static LocalInputChannel createLocalInputChannel(
+               SingleInputGate inputGate,
+               int channelIndex,
+               ResultPartitionManager partitionManager) {
+
+               return new LocalInputChannel(
+                       inputGate,
+                       channelIndex,
+                       new ResultPartitionID(),
+                       partitionManager,
+                       new TaskEventDispatcher(),
+                       0,
+                       0,
+                       
UnregisteredMetricGroups.createUnregisteredTaskMetricGroup().getIOMetricGroup());
+       }
+
+       public static LocalInputChannel createLocalInputChannel(
+               SingleInputGate inputGate,
+               ResultPartitionManager partitionManager,
+               Tuple2<Integer, Integer> initialAndMaxRequestBackoff) {
 
 Review comment:
   I just migrated it from previous 
`LocalInputChannelTest#createLocalInputChannel` to keep the same form. I think 
the separate parameters seem better. I would adjust 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:
[email protected]


With regards,
Apache Git Services

Reply via email to