zhijiangW commented on a change in pull request #8362: [FLINK-11391] Introduce
shuffle master interface
URL: https://github.com/apache/flink/pull/8362#discussion_r289726213
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/partition/consumer/SingleInputGateTest.java
##########
@@ -499,20 +504,23 @@ public void testUpdateUnknownInputChannel() throws
Exception {
assertThat(inputGate.getInputChannels().get(localResultPartitionId.getPartitionId()),
is(instanceOf((UnknownInputChannel.class))));
+ ResourceID localLocation = ResourceID.generate();
+
// Trigger updates to remote input channel from unknown
input channel
- inputGate.updateInputChannel(new
InputChannelDeploymentDescriptor(
- remoteResultPartitionId,
-
ResultPartitionLocation.createRemote(InputChannelBuilder.STUB_CONNECTION_ID)));
+ ShuffleDescriptor remoteSdd =
createRemoteWithIdAndLocation(
+ remoteResultPartitionId.getPartitionId(),
+ ResourceID.generate());
+ inputGate.updateInputChannel(localLocation, new
PartitionInfo(new IntermediateDataSetID(), remoteSdd));
assertThat(inputGate.getInputChannels().get(remoteResultPartitionId.getPartitionId()),
is(instanceOf((RemoteInputChannel.class))));
assertThat(inputGate.getInputChannels().get(localResultPartitionId.getPartitionId()),
is(instanceOf((UnknownInputChannel.class))));
// Trigger updates to local input channel from unknown
input channel
- inputGate.updateInputChannel(new
InputChannelDeploymentDescriptor(
- localResultPartitionId,
- ResultPartitionLocation.createLocal()));
+ ShuffleDescriptor localSdd =
createRemoteWithIdAndLocation(
+ localResultPartitionId.getPartitionId(),
localLocation);
+ inputGate.updateInputChannel(localLocation, new
PartitionInfo(new IntermediateDataSetID(), localSdd));
Review comment:
ditto: reuse `createPartitionInfo()`
----------------------------------------------------------------
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