[web] reuse browser instance across screenshot tests (flutter/engine#28936)

This commit is contained in:
Yegor
2021-09-29 16:45:15 -07:00
committed by GitHub
parent c3ff523c74
commit 6f5d117c74

View File

@@ -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: <FilePath>[screenshotTestFilePath],
testFiles: screenshotTestFiles,
browserEnvironment: browserEnvironment,
concurrency: 1,
expectFailure: false,