zhuzhurk 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_r366844097
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionTest.java
 ##########
 @@ -540,6 +553,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 ScheduledExecutorService executor = new 
DirectScheduledExecutorService();
+               final ShuffleMaster<ShuffleDescriptor> shuffleMaster = new 
TestingShuffleMaster();
+
+               final ExecutionJobVertex sourceJobVertex = 
getExecutionVertex(new JobVertexID(), executor, EAGER, shuffleMaster);
 
 Review comment:
   Currently we we have no other way to create an ExecutionVertex without 
creating an `ExecutionGraph`. So even if you use 
`ExecutionGraphTestUtils#getExecutionVertex(...)`, it still creates an 
`ExecutionGraph` for each vertex to achieve the goal, which is tricky that we 
are operating vertices on 2 different graphs and connect them with edges.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to