You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2015/08/17 00:06:17 UTC

flink git commit: [tests] Make timeout discarding checks in CheckpointCoordinatorTest more robust.

Repository: flink
Updated Branches:
  refs/heads/master 358259d25 -> e4e44bedb


[tests] Make timeout discarding checks in CheckpointCoordinatorTest more robust.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/e4e44bed
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/e4e44bed
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/e4e44bed

Branch: refs/heads/master
Commit: e4e44bedbfb68770fb2cbd89dedaed892b58274d
Parents: 358259d
Author: Stephan Ewen <se...@apache.org>
Authored: Sun Aug 16 23:17:26 2015 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Sun Aug 16 23:17:26 2015 +0200

----------------------------------------------------------------------
 .../flink/runtime/checkpoint/CheckpointCoordinatorTest.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/e4e44bed/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
index cfe77d3..1330b66 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java
@@ -588,7 +588,9 @@ public class CheckpointCoordinatorTest {
 			do {
 				Thread.sleep(250);
 			}
-			while (!checkpoint.isDiscarded() && System.currentTimeMillis() < deadline);
+			while (!checkpoint.isDiscarded() &&
+					coord.getNumberOfPendingCheckpoints() > 0 &&
+					System.currentTimeMillis() < deadline);
 			
 			assertTrue("Checkpoint was not canceled by the timeout", checkpoint.isDiscarded());
 			assertEquals(0, coord.getNumberOfPendingCheckpoints());