You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/02/26 07:06:09 UTC

[GitHub] [flink] zhuzhurk commented on a change in pull request #11187: [FLINK-16234]Use LinkedHashSet for a deterministic iteration order

zhuzhurk commented on a change in pull request #11187: [FLINK-16234]Use LinkedHashSet for a deterministic iteration order
URL: https://github.com/apache/flink/pull/11187#discussion_r384305514
 
 

 ##########
 File path: flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGeneratorTest.java
 ##########
 @@ -805,10 +814,19 @@ public void testSlotSharingOnAllVerticesInSameSlotSharingGroupByDefaultDisabled(
 		final List<JobVertex> verticesSorted = jobGraph.getVerticesSortedTopologicallyFromSources();
 		assertEquals(4, verticesSorted.size());
 
-		final JobVertex source1Vertex = verticesSorted.get(0);
-		final JobVertex source2Vertex = verticesSorted.get(1);
-		final JobVertex map1Vertex = verticesSorted.get(2);
-		final JobVertex map2Vertex = verticesSorted.get(3);
+		JobVertex source1Vertex = null, source2Vertex = null, map1Vertex = null, map2Vertex= null;
+		for (int i = 0; i < 4; i++)
 
 Review comment:
   we could extract this matching block to a common method to avoid duplication. It can return a list of JobVertices in the expected order.

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


With regards,
Apache Git Services