Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/1776#discussion_r57141500
--- Diff:
flink-tests/src/test/java/org/apache/flink/test/javaApiOperators/CustomDistributionITCase.java
---
@@ -94,12 +104,10 @@ public void testRangeWithDistribution2() throws
Exception{
@Override
public void mapPartition(Iterable<Tuple3<Integer,
Integer, String>> values, Collector<Boolean> out) throws Exception {
int partitionIndex =
getRuntimeContext().getIndexOfThisSubtask();
-
for (Tuple3<Integer, Integer, String> s :
values) {
- if (s.f0 <= partitionIndex *
(partitionIndex + 1) / 2 ||
- s.f0 > (partitionIndex
+ 1) * (partitionIndex + 2) / 2 ||
- s.f1 - 1 !=
partitionIndex) {
- fail("Record was not correctly
partitioned: " + s.toString());
+
+ if ((s.f0 > partitionIndex + 1) ||
((s.f0 == partitionIndex + 1) && (s.f1 > dist.rightBoundary[partitionIndex]))) {
--- End diff --
The test checks only one bucket boundary. We need to check
- the upper boundary if `partitionIndex == 0`
- lower and upper boundaries if `0 < `partitionIndex` < 4`
- the lower boundary if `partitionIndex == 4.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---