Repository navigation
test(third-party-impact): wait for the long frame, and say what the page saw on a failure - #293
Merged
Merged
Conversation
…and say what the page saw The test of the warning for a domain with a large share of main-thread time failed twice in CI with 0 ms for the blocking script, and never on a laptop or in Docker with Playwright 1.63, two CPUs and the whole e2e suite running at the same time (60 loads and 30 runs). Either the long animation frame reached the timeline after the fixed wait of 500 ms, or it came without the script. The test now waits up to 5 seconds for a long animation frame instead of a fixed time, which covers the first case. If it fails again, its message says how long it waited and lists the frames of the page with their scripts, which tells the two cases apart.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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
third-party-impact.test.js› "warns when one domain holds a large share of main-thread time" failed in CI on #284 and #290 withexpected 0 to be greater than 250: the snippet attributed no time to the third-party script that blocks for 320 ms. A re-run passed both times.It does not reproduce outside CI: 30 of 30 loads on a laptop, idle and with every core busy, and in Docker (Playwright 1.63.0, Linux, 2 CPUs) 60 of 60 loads with a diagnostic and 30 of 30 runs of the test while the whole e2e suite ran alongside.
Two causes fit the 0: the long animation frame reaches the timeline after the 500 ms the test waits, or it comes without the script. The test now:
sourceURL,invokerType, duration), which tells the two causes apart if it fails again.Test plan
mcr.microsoft.com/playwright:v1.63.0-nobleand 2 CPUs: no failure in 60 loads and 30 runs with the suite in parallel, locallyblocking.js, locally