flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [11/11] flink git commit: [hotfix] [tests] Fix test instability in SavepointITCase
Date Tue, 28 Feb 2017 18:36:54 GMT
[hotfix] [tests] Fix test instability in SavepointITCase


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

Branch: refs/heads/master
Commit: 3086af534cfcea0ccb39d3058c172983cc17dabe
Parents: c477d87
Author: Stephan Ewen <sewen@apache.org>
Authored: Tue Feb 28 19:16:48 2017 +0100
Committer: Stephan Ewen <sewen@apache.org>
Committed: Tue Feb 28 19:16:48 2017 +0100

----------------------------------------------------------------------
 .../org/apache/flink/test/checkpointing/SavepointITCase.java   | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/3086af53/flink-tests/src/test/java/org/apache/flink/test/checkpointing/SavepointITCase.java
----------------------------------------------------------------------
diff --git a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/SavepointITCase.java
b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/SavepointITCase.java
index ee371dd..ed45807 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/SavepointITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/SavepointITCase.java
@@ -61,6 +61,7 @@ import org.apache.flink.runtime.state.filesystem.FsStateBackendFactory;
 import org.apache.flink.runtime.testingUtils.TestingCluster;
 import org.apache.flink.runtime.testingUtils.TestingJobManagerMessages.RequestSavepoint;
 import org.apache.flink.runtime.testingUtils.TestingJobManagerMessages.ResponseSavepoint;
+import org.apache.flink.runtime.testingUtils.TestingJobManagerMessages.WaitForAllVerticesToBeRunning;
 import org.apache.flink.runtime.testingUtils.TestingTaskManagerMessages;
 import org.apache.flink.runtime.testingUtils.TestingTaskManagerMessages.ResponseSubmitTaskListener;
 import org.apache.flink.runtime.testutils.CommonTestUtils;
@@ -180,6 +181,11 @@ public class SavepointITCase extends TestLogger {
 
 			LOG.info("Waiting for some progress.");
 
+			// wait for the JobManager to be ready
+			Future<Object> allRunning = jobManager.ask(new WaitForAllVerticesToBeRunning(jobId),
deadline.timeLeft());
+			Await.ready(allRunning, deadline.timeLeft());
+
+			// wait for the Tasks to be ready
 			StatefulCounter.getProgressLatch().await(deadline.timeLeft().toMillis(), TimeUnit.MILLISECONDS);
 
 			LOG.info("Triggering a savepoint.");


Mime
View raw message