XComp commented on a change in pull request #14465:
URL: https://github.com/apache/flink/pull/14465#discussion_r549691715



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphCoLocationRestartTest.java
##########
@@ -130,22 +132,23 @@ public void testConstraintsAfterRestart() throws 
Exception {
                        timeout);
 
                //checking execution vertex properties
-               validateConstraints(eg);
+               validateConstraints(eg, 
slotSharingStrategyFactory.getMostRecentStrategyInstance());
 
                ExecutionGraphTestUtils.finishAllVertices(eg);
 
                assertThat(eg.getState(), is(FINISHED));
        }
 
-       private void validateConstraints(ExecutionGraph eg) {
+       private void validateConstraints(ExecutionGraph eg, SlotSharingStrategy 
slotSharingStrategy) {
 
                ExecutionJobVertex[] tasks = 
eg.getAllVertices().values().toArray(new ExecutionJobVertex[2]);
 
                for (int i = 0; i < NUM_TASKS; i++) {
-                       CoLocationConstraint constr1 = 
tasks[0].getTaskVertices()[i].getLocationConstraint();
-                       CoLocationConstraint constr2 = 
tasks[1].getTaskVertices()[i].getLocationConstraint();
-                       assertThat(constr1.isAssigned(), is(true));
-                       assertThat(constr1.getLocation(), 
equalTo(constr2.getLocation()));
+                       ExecutionVertexID executionVertexID0 = 
tasks[0].getTaskVertices()[i].getID();
+                       ExecutionVertexID executionVertexID1 = 
tasks[1].getTaskVertices()[i].getID();
+
+                       
assertThat(slotSharingStrategy.getExecutionSlotSharingGroup(executionVertexID0).getExecutionVertexIds(),
 hasItem(executionVertexID1));
+                       
assertThat(slotSharingStrategy.getExecutionSlotSharingGroup(executionVertexID1).getExecutionVertexIds(),
 hasItem(executionVertexID0));

Review comment:
       Great. That fixes the visibility changes 👍 




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


Reply via email to