Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Side by Side Diff: lib/src/runner/engine.dart

Issue 1981283006: Fix a bug with the implementation of LiveSuite. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « CHANGELOG.md ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 7
8 import 'package:async/async.dart' hide Result; 8 import 'package:async/async.dart' hide Result;
9 import 'package:collection/collection.dart'; 9 import 'package:collection/collection.dart';
10 import 'package:pool/pool.dart'; 10 import 'package:pool/pool.dart';
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 } else { 248 } else {
249 controller = new LiveSuiteController(suite); 249 controller = new LiveSuiteController(suite);
250 } 250 }
251 251
252 _addLiveSuite(controller.liveSuite); 252 _addLiveSuite(controller.liveSuite);
253 253
254 await _runPool.withResource(() async { 254 await _runPool.withResource(() async {
255 if (_closed) return; 255 if (_closed) return;
256 await _runGroup(controller, controller.liveSuite.suite.group, []); 256 await _runGroup(controller, controller.liveSuite.suite.group, []);
257 controller.noMoreLiveTests();
257 loadResource.allowRelease(() => controller.close()); 258 loadResource.allowRelease(() => controller.close());
258 }); 259 });
259 })); 260 }));
260 }, onDone: () { 261 }, onDone: () {
261 _onSuiteAddedController.close(); 262 _onSuiteAddedController.close();
262 _group.close(); 263 _group.close();
263 }); 264 });
264 265
265 return success; 266 return success;
266 } 267 }
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 var futures = allLiveTests.map((liveTest) => liveTest.close()).toList(); 480 var futures = allLiveTests.map((liveTest) => liveTest.close()).toList();
480 481
481 // Closing the load pool will close the test suites as soon as their tests 482 // Closing the load pool will close the test suites as soon as their tests
482 // are done. For browser suites this is effectively immediate since their 483 // are done. For browser suites this is effectively immediate since their
483 // tests shut down as soon as they're closed, but for VM suites we may need 484 // tests shut down as soon as they're closed, but for VM suites we may need
484 // to wait for tearDowns or tearDownAlls to run. 485 // to wait for tearDowns or tearDownAlls to run.
485 futures.add(_loadPool.close()); 486 futures.add(_loadPool.close());
486 await Future.wait(futures, eagerError: true); 487 await Future.wait(futures, eagerError: true);
487 } 488 }
488 } 489 }
OLDNEW
« no previous file with comments | « CHANGELOG.md ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698