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

Unified Diff: lib/src/executable.dart

Issue 1206033004: Only load a certain number of test suites at once. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: lib/src/executable.dart
diff --git a/lib/src/executable.dart b/lib/src/executable.dart
index 7e543d139772e6305558ec87b9f0e383223df0b3..6a10cf36f3909df86fd550b36cb9a3031ba334ba 100644
--- a/lib/src/executable.dart
+++ b/lib/src/executable.dart
@@ -320,17 +320,12 @@ Future _loadSuites(List<String> paths, Pattern pattern, Loader loader,
throw new LoadException(path, 'Does not exist.'))
]);
})).listen((loadSuite) {
- group.add(new Future.sync(() async {
- engine.suiteSink.add(loadSuite);
-
- var suite = await loadSuite.suite;
- if (suite == null) return;
- if (pattern != null) {
- suite = suite.change(
+ group.add(new Future.sync(() {
+ engine.suiteSink.add(loadSuite.changeSuite((suite) {
+ if (pattern == null) return suite;
+ return suite.change(
tests: suite.tests.where((test) => test.name.contains(pattern)));
- }
-
- engine.suiteSink.add(suite);
+ }));
}));
}, onError: (error, stackTrace) {
group.add(new Future.error(error, stackTrace));

Powered by Google App Engine
This is Rietveld 408576698