diff --git a/packages/flutter_tools/lib/src/test/runner.dart b/packages/flutter_tools/lib/src/test/runner.dart index 95c89f6ab4..170d59898f 100644 --- a/packages/flutter_tools/lib/src/test/runner.dart +++ b/packages/flutter_tools/lib/src/test/runner.dart @@ -38,6 +38,16 @@ Future runTests( testArgs.addAll(['-r', 'json']); } + if (enableObservatory) { + // (In particular, for collecting code coverage.) + + // Turn on concurrency, but just barely. If we just go with full concurrency, then + // individual tests timeout. If we turn it off (=1), then the overall tests timeout. + // This is a lit fuse... Eventually it won't matter what number we put here. + // TODO(gspencer): Fix this: https://github.com/flutter/flutter/issues/10694 + testArgs.add('--concurrency=2'); + } + for (String name in names) { testArgs..add('--name')..add(name); }