zhijiangW commented on a change in pull request #8463: [FLINK-12530][network]
Move Task.inputGatesById to NetworkEnvironment
URL: https://github.com/apache/flink/pull/8463#discussion_r286299195
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateTest.java
##########
@@ -522,30 +525,72 @@ public void testUpdateUnknownInputChannel() throws
Exception {
}
@Test
- public void checkInputGateRemoveInNetworkEnvironment() throws
IOException {
- NetworkEnvironment network = createNetworkEnvironment();
- InputChannelDeploymentDescriptor[] channelDescs = new
InputChannelDeploymentDescriptor[]{
- // Local
- new InputChannelDeploymentDescriptor(
- new ResultPartitionID(),
- ResultPartitionLocation.createLocal())};
- IntermediateDataSetID id = new IntermediateDataSetID();
- InputGateDeploymentDescriptor igdd = new
InputGateDeploymentDescriptor(id,
- ResultPartitionType.PIPELINED, 0, channelDescs);
- SingleInputGate[] inputGates = network.createInputGates("",
- new NoOpTaskActions(), Collections.singletonList(igdd),
- new UnregisteredMetricsGroup(), new
UnregisteredMetricsGroup(), new UnregisteredMetricsGroup(),
- new SimpleCounter());
- assertEquals(1, inputGates.length);
- assertEquals(1, network.getInputGatesById().size());
- assertTrue(network.getInputGatesById().containsKey(id));
- inputGates[0].close();
- assertEquals(0, network.getInputGatesById().size());
- assertFalse(network.getInputGatesById().containsKey(id));
+ public void checkInputGateRemoveInNetworkEnvironment() throws Exception
{
Review comment:
checkInputGateRemoveInNetworkEnvironment ->
testInputGateRemoveInNetworkEnvironment ?
----------------------------------------------------------------
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