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_r384305119
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGeneratorTest.java
##########
@@ -785,10 +785,19 @@ public void
testSlotSharingOnAllVerticesInSameSlotSharingGroupByDefaultEnabled()
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++)
+ {
+ JobVertex vertex = verticesSorted.get(i);
+ if (vertex.getName().equals("Source: source1"))
Review comment:
I'd prefer to change the matching to `if
(vertex.getName().contains("source1"))`.
----------------------------------------------------------------
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