提交 bd7d8679 编写于 作者: R Robert Metzger

[FLINK-1949] Fix issue detecting stopped detached YARN session

上级 113b20b7
......@@ -472,7 +472,7 @@ public class YARNSessionFIFOITCase extends YarnTestBase {
LOG.info("waiting for the job with appId {} to finish", tmpAppId);
// wait until the app has finished
while(yc.getApplications(EnumSet.of(YarnApplicationState.RUNNING)).size() == 0) {
while(yc.getApplications(EnumSet.of(YarnApplicationState.RUNNING)).size() > 0) {
sleep(500);
}
} else {
......
......@@ -471,14 +471,15 @@ public abstract class YarnTestBase {
expectedStringSeen = true;
LOG.info("Found expected output in redirected streams");
// send "stop" command to command line interface
LOG.info("RunWithArgs: request runner to stop");
runner.sendStop();
// wait for the thread to stop
try {
runner.join(1000);
runner.join(10000);
} catch (InterruptedException e) {
LOG.warn("Interrupted while stopping runner", e);
LOG.debug("Interrupted while stopping runner", e);
}
LOG.warn("stopped");
LOG.warn("RunWithArgs runner stopped.");
break;
}
// check if thread died
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册