Skip to content

test: drop networkidle waits in block_requests tests - #2469

Open
vdusek wants to merge 2 commits into
masterfrom
test/deflake-block-requests-networkidle
Open

vdusek wants to merge 2 commits into
masterfrom
test/deflake-block-requests-networkidle

Conversation

@vdusek

@vdusek vdusek commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

test_block_requests_default timed out on Windows CI in page.wait_for_load_state('networkidle') after the blocked page loaded (run). networkidle waits until Playwright's own list of in-flight requests is empty for 500 ms. On the loaded runner one request stayed on that list, so the wait ran for the full 30 s.

The tests do not need networkidle. page.goto already waits for the load event, and the browser fires load only after the script and image requests have finished or failed. This PR removes the networkidle wait from all three block_requests tests.

The two tests with custom patterns also counted only requestfinished events, so a transport error such as net::ERR_NO_BUFFER_SPACE on a loaded Windows runner failed them. They now use track_requests, like the default test, and assert which requests were requested and which were blocked.

I could not reproduce the timeout on Linux (0 failures in 600 runs under xdist), so the Windows CI run is the real check.

✍️ Drafted by Claude Code

@vdusek vdusek added t-tooling Issues with this label are in the ownership of the tooling team. adhoc Ad-hoc unplanned task added during the sprint. labels Nov 18, 2026
@vdusek vdusek self-assigned this Nov 18, 2026
@codecov

codecov Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.25%. Comparing base (4275339) to head (06dacb9).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2469      +/-   ##
==========================================
- Coverage   94.25%   94.25%   -0.01%     
==========================================
  Files         184      184              
  Lines       13690    13690              
==========================================
- Hits        12904    12903       -1     
- Misses        786      787       +1     
Flag Coverage Δ
integration 76.55% <ø> (-0.02%) ⬇️
unit 85.75% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vdusek vdusek changed the title test: drop networkidle wait in block_requests test test: drop networkidle waits in block_requests tests Nov 18, 2026
@vdusek
vdusek requested a review from Mantisus November 18, 2026 07:11
@vdusek
vdusek marked this pull request as ready for review November 18, 2026 07:11
@vdusek
vdusek requested a review from Pijukatel November 18, 2026 13:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

adhoc Ad-hoc unplanned task added during the sprint. t-tooling Issues with this label are in the ownership of the tooling team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants