Repository: flink Updated Branches: refs/heads/release-1.6 1ee705afa -> 8b1cc1674
[hotfix] Fix loop in FailingSource Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/8b1cc167 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8b1cc167 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8b1cc167 Branch: refs/heads/release-1.6 Commit: 8b1cc16745ce2759d1bcf72f9bcb55da6ab2ae1b Parents: 1ee705a Author: Stefan Richter <[email protected]> Authored: Fri Jul 20 20:28:55 2018 +0200 Committer: Stefan Richter <[email protected]> Committed: Fri Jul 20 20:31:23 2018 +0200 ---------------------------------------------------------------------- .../org/apache/flink/test/checkpointing/utils/FailingSource.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/8b1cc167/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/FailingSource.java ---------------------------------------------------------------------- diff --git a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/FailingSource.java b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/FailingSource.java index 822d73b..ff49959 100644 --- a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/FailingSource.java +++ b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/FailingSource.java @@ -98,12 +98,11 @@ public class FailingSource extends RichSourceFunction<Tuple2<Long, IntType>> // we loop longer than we have elements, to permit delayed checkpoints // to still cause a failure - while (running) { + while (running && emitCallCount < expectedEmitCalls) { // the function failed before, or we are in the elements before the failure synchronized (ctx.getCheckpointLock()) { eventEmittingGenerator.emitEvent(ctx, emitCallCount++); - running &= (emitCallCount < expectedEmitCalls); } if (emitCallCount < failureAfterNumElements) {
