Chromium Code Reviews| Index: dart/tools/testing/dart/test_runner.dart |
| diff --git a/dart/tools/testing/dart/test_runner.dart b/dart/tools/testing/dart/test_runner.dart |
| index da880bd6af4806978c7871719b19869dbe4f1247..ed530cce4bae9d8df4c843f044b310979aef6394 100644 |
| --- a/dart/tools/testing/dart/test_runner.dart |
| +++ b/dart/tools/testing/dart/test_runner.dart |
| @@ -2607,6 +2607,7 @@ class TestCaseCompleter { |
| TestCaseCompleter(this.graph, this.enqueuer, this.commandQueue) { |
| var eventCondition = graph.events.where; |
| + bool finishedRemainingTestCases = false; |
|
Bill Hesse
2014/04/02 07:52:54
Should this member be private? I don't see any us
kustermann
2014/04/02 08:01:57
This is a variable inside a method/constructor, th
|
| // Store all the command outputs -- they will be delivered synchronously |
| // (i.e. before state changes in the graph) |
| @@ -2614,6 +2615,7 @@ class TestCaseCompleter { |
| _outputs[output.command] = output; |
| }, onDone: () { |
| _completeTestCasesIfPossible(new List.from(enqueuer.remainingTestCases)); |
| + finishedRemainingTestCases = true; |
| assert(enqueuer.remainingTestCases.isEmpty); |
| _checkDone(); |
| }); |
|
kustermann
2014/04/01 23:38:14
When this onDone is called, all remaining TestCase
|
| @@ -2622,7 +2624,8 @@ class TestCaseCompleter { |
| // changes. |
| eventCondition((event) => event is dgraph.StateChangedEvent) |
| .listen((dgraph.StateChangedEvent event) { |
| - if (event.from == dgraph.NodeState.Processing) { |
| + if (event.from == dgraph.NodeState.Processing && |
| + !finishedRemainingTestCases ) { |
| var command = event.node.userData; |
| assert(COMPLETED_STATES.contains(event.to)); |
| @@ -2653,7 +2656,7 @@ class TestCaseCompleter { |
| } |
| } |
| - void _completeTestCasesIfPossible(Iterable<TestCase> testCases){ |
| + void _completeTestCasesIfPossible(Iterable<TestCase> testCases) { |
| // Update TestCases with command outputs |
| for (TestCase test in testCases) { |
| for (var icommand in test.commands) { |