Fix hanging test script batch runners.

BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org//707733003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41553 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
whesse@google.com
2014-11-06 13:03:00 +00:00
parent ee84420ff9
commit d71ecd85d9
+4 -2
View File
@@ -1964,6 +1964,8 @@ class BatchRunnerProcess {
});
};
_process.kill();
_stdoutSubscription.cancel();
_stderrSubscription.cancel();
} else {
doStartTest(command, timeout);
}
@@ -1973,12 +1975,12 @@ class BatchRunnerProcess {
Future terminate() {
if (_process == null) return new Future.value(true);
Completer terminateCompleter = new Completer();
Timer killTimer;
_processExitHandler = (_) {
if (killTimer != null) killTimer.cancel();
terminateCompleter.complete(true);
};
_process.kill();
_stdoutSubscription.cancel();
_stderrSubscription.cancel();
return terminateCompleter.future;
}