diff --git a/lib/web_ui/dev/steps/run_tests_step.dart b/lib/web_ui/dev/steps/run_tests_step.dart index 99a9cf7256189..ce47068050985 100644 --- a/lib/web_ui/dev/steps/run_tests_step.dart +++ b/lib/web_ui/dev/steps/run_tests_step.dart @@ -117,7 +117,7 @@ class RunTestsStep implements PipelineStep { ); } - // Run all unit-tests as a single batch and with high concurrency. + // Run non-screenshot tests with high concurrency. if (unitTestFiles.isNotEmpty) { await _runTestBatch( testFiles: unitTestFiles, @@ -130,11 +130,11 @@ class RunTestsStep implements PipelineStep { _checkExitCode('Unit tests'); } - // Run screenshot tests one at a time. Otherwise, tests end up - // screenshotting each other. - for (final FilePath screenshotTestFilePath in screenshotTestFiles) { + // Run screenshot tests one at a time to prevent tests from screenshotting + // each other. + if (screenshotTestFiles.isNotEmpty) { await _runTestBatch( - testFiles: [screenshotTestFilePath], + testFiles: screenshotTestFiles, browserEnvironment: browserEnvironment, concurrency: 1, expectFailure: false,