flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject flink git commit: [FLINK-3813][yarn] wait for CLI to complete before checking output
Date Fri, 04 Nov 2016 19:10:49 GMT
Repository: flink
Updated Branches:
  refs/heads/release-1.1 5133bf9ea -> 42334de84


[FLINK-3813][yarn] wait for CLI to complete before checking output

This closes #2749.


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

Branch: refs/heads/release-1.1
Commit: 42334de84a85aa98432bde6dd817f5060e7ce036
Parents: 5133bf9
Author: Maximilian Michels <mxm@apache.org>
Authored: Wed Oct 26 16:37:56 2016 +0100
Committer: Maximilian Michels <mxm@apache.org>
Committed: Fri Nov 4 20:10:27 2016 +0100

----------------------------------------------------------------------
 .../java/org/apache/flink/yarn/YARNSessionFIFOITCase.java     | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/42334de8/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
----------------------------------------------------------------------
diff --git a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
index 0a22a38..507275b 100644
--- a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
+++ b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
@@ -81,10 +81,11 @@ public class YARNSessionFIFOITCase extends YarnTestBase {
 	 * Test regular operation, including command line parameter parsing.
 	 */
 	@Test(timeout=60000) // timeout after a minute.
-	public void testDetachedMode() {
+	public void testDetachedMode() throws InterruptedException {
 		LOG.info("Starting testDetachedMode()");
 		addTestAppender(FlinkYarnSessionCli.class, Level.INFO);
-		startWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(),
+		Runner runner =
+			startWithArgs(new String[]{"-j", flinkUberjar.getAbsolutePath(),
 						"-t", flinkLibFolder.getAbsolutePath(),
 						"-n", "1",
 						"-jm", "768",
@@ -93,6 +94,8 @@ public class YARNSessionFIFOITCase extends YarnTestBase {
 						"--detached"},
 				"Flink JobManager is now running on", RunTypes.YARN_SESSION);
 
+		// before checking any strings outputted by the CLI, first give it time to return
+		runner.join();
 		checkForLogString("The Flink YARN client has been started in detached mode");
 
 		LOG.info("Waiting until two containers are running");


Mime
View raw message