Repository navigation
Give the Playwright app fixture its own timeout - #309
Merged
Merged
Conversation
App startup takes ~14 s in CI (and up to ~35 s) because the page's main thread is saturated while workers run in parallel. That time counted against each test's default 30 s timeout, so tests with short bodies flaked in their beforeEach hooks waiting for the app to become ready. Also upload test-results/ after a failed run, before the --update-snapshots re-run clears it, so traces of failures are kept.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a Playwright flake where a test times out in
beforeEachwhile waiting for the app to start, e.g.add-layer-window.spec.ts› "expanding Russia folder shows Country entry" on #307 and aadd-layer-windowtest in the #303 merge queue run. In both cases the test failed on its retry too.The
appPagefixture's setup time counted against each test's default 30 s timeout. In CI, startup is slow because the page's main thread is saturated while three workers run in parallel. In the #307 report, every trivialpage.evaluatetook 0.5–1 s. Timings from that report:Tests with longer bodies already have
test.setTimeout(60000). Tests with short bodies, like theadd-layer-windowones, had no headroom.Changes
appPagenow has its own fixture timeout of 120 s, so startup no longer counts against the test's timeout.readytitle is raised from 30 s to 60 s, now that it isn't limited by the test timeout.www/test-results/asplaywright-test-resultswhen the first Playwright run fails. Today the--update-snapshotsre-run clears that directory, so the retry traces of the original failure were lost.Testing
beforeEach.CI=1 npx playwright test add-layer-window smokepasses locally (14/14).