zentol commented on a change in pull request #10832:
[FLINK-14163][runtime]Enforce synchronous registration of
Execution#producedPartitions
URL: https://github.com/apache/flink/pull/10832#discussion_r367471726
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionTest.java
##########
@@ -540,6 +551,46 @@ public void testSlotReleaseAtomicallyReleasesExecution()
throws Exception {
});
}
+ /**
+ * Tests that producedPartitions are registered synchronously under an
asynchronous interface.
+ */
+ @Test(expected = IllegalStateException.class)
+ public void testSynchronousRegisterProducedPartitions() throws
Exception {
+ final ShuffleMaster<ShuffleDescriptor> shuffleMaster = new
TestingShuffleMaster();
+ final JobGraph jobGraph = new JobGraph("job graph");
+ final JobVertex source = new JobVertex("source");
+ final JobVertex target = new JobVertex("target");
+
+ source.setInvokableClass(AbstractInvokable.class);
+ target.setInvokableClass(AbstractInvokable.class);
+ target.connectNewDataSetAsInput(source, POINTWISE, PIPELINED);
+ jobGraph.addVertex(source);
+ jobGraph.addVertex(target);
+ ExecutionGraph executionGraph = TestingExecutionGraphBuilder
+ .newBuilder()
+ .setJobGraph(jobGraph)
+ .setShuffleMaster(shuffleMaster)
+ .build();
+
+ final ExecutionVertex sourceVertex =
executionGraph.getAllVertices().get(source.getID()).getTaskVertices()[0];
+ final TaskManagerLocation location =
+ new TaskManagerLocation(ResourceID.generate(),
InetAddress.getLoopbackAddress(), 1);
Review comment:
use `LocalTaskManagerLocation` instead
----------------------------------------------------------------
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