[GitHub] bowenli86 commented on a change in pull request #6544: [FLINK-8532] [Streaming] modify RebalancePartitioner to use a random partition as its first partition

2018-08-13 Thread GitBox
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> re
new Tuple2(2, "c"),
new Tuple2(0, "a"));
 
-   assertEquals(
-   new HashSet>(expected),
-   new HashSet>(rebalancePartitionResult));
+   List> expected1 = Arrays.asList(
+   new Tuple2(1, "a"),
+   new Tuple2(2, "b"),
+   new Tuple2(0, "b"),
+   new Tuple2(1, "a"),
+   new Tuple2(2, "a"),
+   new Tuple2(0, "c"),
+   new Tuple2(1, "a"));
+
+   List> expected2 = Arrays.asList(
+   new Tuple2(2, "a"),
+   new Tuple2(0, "b"),
+   new Tuple2(1, "b"),
+   new Tuple2(2, "a"),
+   new Tuple2(0, "a"),
+   new Tuple2(1, "c"),
+   new Tuple2(2, "a"));
+
+   assertTrue(
 
 Review comment:
   to be more robust for people to modify `expectedX`, 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


[GitHub] bowenli86 commented on a change in pull request #6544: [FLINK-8532] [Streaming] modify RebalancePartitioner to use a random partition as its first partition

2018-08-13 Thread GitBox
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> re
new Tuple2(2, "c"),
new Tuple2(0, "a"));
 
-   assertEquals(
-   new HashSet>(expected),
-   new HashSet>(rebalancePartitionResult));
+   List> expected1 = Arrays.asList(
+   new Tuple2(1, "a"),
+   new Tuple2(2, "b"),
+   new Tuple2(0, "b"),
+   new Tuple2(1, "a"),
+   new Tuple2(2, "a"),
+   new Tuple2(0, "c"),
+   new Tuple2(1, "a"));
+
+   List> expected2 = Arrays.asList(
+   new Tuple2(2, "a"),
+   new Tuple2(0, "b"),
+   new Tuple2(1, "b"),
+   new Tuple2(2, "a"),
+   new Tuple2(0, "a"),
+   new Tuple2(1, "c"),
+   new Tuple2(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