File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1+ ## 0.12.24+4
2+
3+ * Drain browser process ` stdout ` and ` stdin ` . This resolves test flakiness, especially in Travis
4+ with the ` Precise ` image.
5+
16## 0.12.24+3
27
38* Extend ` deserializeTimeout ` .
Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ abstract class Browser {
5151 Future get onExit => _onExitCompleter.future;
5252 final _onExitCompleter = new Completer ();
5353
54+ Future _drainAndIgnore (Stream s) async {
55+ try {
56+ await s.drain ();
57+ } on StateError catch (_) {}
58+ }
59+
5460 /// Creates a new browser.
5561 ///
5662 /// This is intended to be called by subclasses. They pass in [startBrowser] ,
@@ -65,6 +71,10 @@ abstract class Browser {
6571 var process = await startBrowser ();
6672 _processCompleter.complete (process);
6773
74+ // If we don't drain the stdout and stderr the process can hang.
75+ await Future .wait (
76+ [_drainAndIgnore (process.stdout), _drainAndIgnore (process.stderr)]);
77+
6878 var exitCode = await process.exitCode;
6979
7080 // This hack dodges an otherwise intractable race condition. When the user
Original file line number Diff line number Diff line change 11name : test
2- version : 0.12.24+3
2+ version : 0.12.24+4
33author :
Dart Team <[email protected] > 44description : A library for writing dart unit tests.
55homepage : https://github.com/dart-lang/test
You can’t perform that action at this time.
0 commit comments