diff --git a/CHANGELOG.md b/CHANGELOG.md index ad766c31f..015648bda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## 0.12.24-dev +* Fix issue where we were not awaiting some futures. * Extend `deserializeTimeout`. ## 0.12.24+2 diff --git a/lib/src/frontend/stream_matcher.dart b/lib/src/frontend/stream_matcher.dart index 8392d96de..48d9cbc29 100644 --- a/lib/src/frontend/stream_matcher.dart +++ b/lib/src/frontend/stream_matcher.dart @@ -156,7 +156,7 @@ class _StreamMatcher extends AsyncMatcher implements StreamMatcher { // Wait on a timer tick so all buffered events are emitted. await new Future.delayed(Duration.ZERO); - subscription.cancel(); + await subscription.cancel(); var eventsString = events.map((event) { if (event == null) { diff --git a/lib/src/runner.dart b/lib/src/runner.dart index 0b63e5cea..c8d4b34fe 100644 --- a/lib/src/runner.dart +++ b/lib/src/runner.dart @@ -193,7 +193,7 @@ class Runner { if (_debugOperation != null) await _debugOperation.cancel(); - if (_suiteSubscription != null) _suiteSubscription.cancel(); + if (_suiteSubscription != null) await _suiteSubscription.cancel(); _suiteSubscription = null; // Make sure we close the engine *before* the loader. Otherwise, diff --git a/lib/src/runner/browser/content_shell.dart b/lib/src/runner/browser/content_shell.dart index 0a7009a57..4ce3027b9 100644 --- a/lib/src/runner/browser/content_shell.dart +++ b/lib/src/runner/browser/content_shell.dart @@ -73,7 +73,7 @@ class ContentShell extends Browser { !stderr.current .contains("kq_init: detected broken kqueue; not using")) { if (stderr.current == "[dartToStderr]: Dartium build has expired") { - stderr.cancel(); + await stderr.cancel(); process.kill(); // TODO(nweiz): link to dartlang.org once it has download links for // content shell @@ -86,7 +86,7 @@ class ContentShell extends Browser { } else if (stderr.current.contains("bind() returned an error")) { // If we failed to bind to the port, return null to tell // getUnusedPort to try another one. - stderr.cancel(); + await stderr.cancel(); process.kill(); return null; } @@ -99,7 +99,7 @@ class ContentShell extends Browser { remoteDebuggerCompleter.complete(null); } - stderr.cancel(); + await stderr.cancel(); return process; }; diff --git a/lib/src/runner/browser/dartium.dart b/lib/src/runner/browser/dartium.dart index 3e8235b97..c1a2b4235 100644 --- a/lib/src/runner/browser/dartium.dart +++ b/lib/src/runner/browser/dartium.dart @@ -92,12 +92,12 @@ class Dartium extends Browser { if (logs.current.contains("bind() returned an error")) { // If we failed to bind to the port, return null to tell // getUnusedPort to try another one. - logs.cancel(); + await logs.cancel(); process.kill(); return null; } } - logs.cancel(); + await logs.cancel(); } else { observatoryCompleter.complete(null); } diff --git a/lib/src/runner/engine.dart b/lib/src/runner/engine.dart index 07dbbeeac..e1aee95bc 100644 --- a/lib/src/runner/engine.dart +++ b/lib/src/runner/engine.dart @@ -529,8 +529,8 @@ class Engine { Future close() async { _closed = true; if (_closedBeforeDone != null) _closedBeforeDone = true; - _onSuiteAddedController.close(); - _suiteController.close(); + await _onSuiteAddedController.close(); + await _suiteController.close(); // Close the running tests first so that we're sure to wait for them to // finish before we close their suites and cause them to become unloaded. diff --git a/lib/src/runner/load_suite.dart b/lib/src/runner/load_suite.dart index d8194ddfa..0beaf966c 100644 --- a/lib/src/runner/load_suite.dart +++ b/lib/src/runner/load_suite.dart @@ -80,7 +80,7 @@ class LoadSuite extends Suite implements RunnerSuite { if (completer.isCompleted) { // If the load test has already been closed, close the suite it // generated. - suite?.close(); + await suite?.close(); return; } diff --git a/lib/src/runner/runner_suite.dart b/lib/src/runner/runner_suite.dart index 45cb6d97a..9d9ed1db0 100644 --- a/lib/src/runner/runner_suite.dart +++ b/lib/src/runner/runner_suite.dart @@ -114,7 +114,7 @@ class RunnerSuiteController { /// The backing function for [suite.close]. Future _close() => _closeMemo.runOnce(() async { - _onDebuggingController.close(); + await _onDebuggingController.close(); if (_onClose != null) await _onClose(); }); final _closeMemo = new AsyncMemoizer(); diff --git a/test/runner/expanded_reporter_test.dart b/test/runner/expanded_reporter_test.dart index 5a4097a5b..ea01d4268 100644 --- a/test/runner/expanded_reporter_test.dart +++ b/test/runner/expanded_reporter_test.dart @@ -350,7 +350,7 @@ void main() { } Future _expectReport(String tests, String expected, {List args}) async { - d + await d .file( "test.dart", """ diff --git a/test/runner/json_reporter_test.dart b/test/runner/json_reporter_test.dart index 92af2e774..83bbc1b72 100644 --- a/test/runner/json_reporter_test.dart +++ b/test/runner/json_reporter_test.dart @@ -563,7 +563,7 @@ void main() { /// [expected]. Future _expectReport(String tests, List expected, {List args}) async { - d + await d .file( "test.dart", """ diff --git a/test/runner/pub_serve_test.dart b/test/runner/pub_serve_test.dart index 1c1c3de44..ed17ddc56 100644 --- a/test/runner/pub_serve_test.dart +++ b/test/runner/pub_serve_test.dart @@ -307,7 +307,7 @@ void main() { containsInOrder( [" main.", "package:test", "dart:async/zone.dart"])); await test.shouldExit(1); - pub.kill(); + await pub.kill(); }, tags: 'chrome'); test("on Node", () async { diff --git a/test/runner/retry_test.dart b/test/runner/retry_test.dart index a5405c8eb..6f8558db4 100644 --- a/test/runner/retry_test.dart +++ b/test/runner/retry_test.dart @@ -65,7 +65,7 @@ void main() { }); test("respects top-level @Retry declarations", () async { - d + await d .file( "test.dart", """