Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.12.24-dev

* Fix issue where we were not awaiting some futures.
* Extend `deserializeTimeout`.

## 0.12.24+2
Expand Down
2 changes: 1 addition & 1 deletion lib/src/frontend/stream_matcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions lib/src/runner/browser/content_shell.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
}
Expand All @@ -99,7 +99,7 @@ class ContentShell extends Browser {
remoteDebuggerCompleter.complete(null);
}

stderr.cancel();
await stderr.cancel();
return process;
};

Expand Down
4 changes: 2 additions & 2 deletions lib/src/runner/browser/dartium.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions lib/src/runner/engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think these are the most likely candidates for the source of the flakiness. It's possible that there was a race condition where their events hadn't fully propagated, which would mean that the close() calls below didn't hit all the relevant tests.

It would be an interesting experiment to try awaiting only these and seeing if that clears up the flakiness.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed this await and did a couple Travis runs. Unfortunately I could not get into the flaky state.


// 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.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/runner/load_suite.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/runner/runner_suite.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion test/runner/expanded_reporter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ void main() {
}

Future _expectReport(String tests, String expected, {List<String> args}) async {
d
await d
.file(
"test.dart",
"""
Expand Down
2 changes: 1 addition & 1 deletion test/runner/json_reporter_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ void main() {
/// [expected].
Future _expectReport(String tests, List<Map> expected,
{List<String> args}) async {
d
await d
.file(
"test.dart",
"""
Expand Down
2 changes: 1 addition & 1 deletion test/runner/pub_serve_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ void main() {
containsInOrder(
[" main.<fn>", "package:test", "dart:async/zone.dart"]));
await test.shouldExit(1);
pub.kill();
await pub.kill();
}, tags: 'chrome');

test("on Node", () async {
Expand Down
2 changes: 1 addition & 1 deletion test/runner/retry_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void main() {
});

test("respects top-level @Retry declarations", () async {
d
await d
.file(
"test.dart",
"""
Expand Down