Skip to content

Commit 6c880f5

Browse files
authored
Fix a race condition in BrowserManager. (#490)
If a web test emitted any kind of message after the browser manager was closed, the debugging timer would reset and cause the VM not to exit for an extra three seconds.
1 parent 19dbc8a commit 6c880f5

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.12.15+12
2+
3+
* Fix a race condition that could cause the runner to stall for up to three
4+
seconds after completing.
5+
16
## 0.12.15+11
27

38
* Make test iframes visible when debugging.

lib/src/runner/browser/browser_manager.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class BrowserManager {
163163
_channel = new MultiChannel(webSocket.transform(jsonDocument)
164164
.changeStream((stream) {
165165
return stream.map((message) {
166-
_timer.reset();
166+
if (!_closed) _timer.reset();
167167
for (var controller in _controllers) {
168168
controller.setDebugging(false);
169169
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: test
2-
version: 0.12.16-dev
2+
version: 0.12.15+12
33
author: Dart Team <[email protected]>
44
description: A library for writing dart unit tests.
55
homepage: https://github.com/dart-lang/test

0 commit comments

Comments
 (0)