bowenli86 commented on a change in pull request #6544: [FLINK-8532] [Streaming] 
modify RebalancePartitioner to use a random partition as its first partition
URL: https://github.com/apache/flink/pull/6544#discussion_r209712274
 
 

 ##########
 File path: 
flink-tests/src/test/java/org/apache/flink/test/streaming/runtime/PartitionerITCase.java
 ##########
 @@ -228,9 +229,29 @@ private static void 
verifyRebalancePartitioning(List<Tuple2<Integer, String>> re
                                new Tuple2<Integer, String>(2, "c"),
                                new Tuple2<Integer, String>(0, "a"));
 
-               assertEquals(
-                               new HashSet<Tuple2<Integer, String>>(expected),
-                               new HashSet<Tuple2<Integer, 
String>>(rebalancePartitionResult));
+               List<Tuple2<Integer, String>> expected1 = Arrays.asList(
+                               new Tuple2<Integer, String>(1, "a"),
+                               new Tuple2<Integer, String>(2, "b"),
+                               new Tuple2<Integer, String>(0, "b"),
+                               new Tuple2<Integer, String>(1, "a"),
+                               new Tuple2<Integer, String>(2, "a"),
+                               new Tuple2<Integer, String>(0, "c"),
+                               new Tuple2<Integer, String>(1, "a"));
+
+               List<Tuple2<Integer, String>> expected2 = Arrays.asList(
+                               new Tuple2<Integer, String>(2, "a"),
+                               new Tuple2<Integer, String>(0, "b"),
+                               new Tuple2<Integer, String>(1, "b"),
+                               new Tuple2<Integer, String>(2, "a"),
+                               new Tuple2<Integer, String>(0, "a"),
+                               new Tuple2<Integer, String>(1, "c"),
+                               new Tuple2<Integer, String>(2, "a"));
+
+               assertTrue(
 
 Review comment:
   to be more robust, shall this assert that exactly one case match and the 
other two unmatch? 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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