test: Deflake test_error_handler_can_access_page on Windows CI#2018
Open
vdusek wants to merge 3 commits into
Open
test: Deflake test_error_handler_can_access_page on Windows CI#2018vdusek wants to merge 3 commits into
vdusek wants to merge 3 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2018 +/- ##
==========================================
- Coverage 93.36% 93.34% -0.02%
==========================================
Files 179 179
Lines 12488 12488
==========================================
- Hits 11659 11657 -2
- Misses 829 831 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pijukatel
reviewed
Jul 3, 2026
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.
test_error_handler_can_access_pagefails intermittently on the Windows CI runner (example run). Underxdistload, Playwright'sPage.gotooccasionally fails withnet::ERR_NO_BUFFER_SPACEbefore the page is navigated. That attempt's error handler then receives aBasicCrawlingContext(recorded asNone) instead of aPlaywrightCrawlingContext, so the exact-list assertion[HELLO_WORLD, HELLO_WORLD]breaks with[None, HELLO_WORLD].The crawler behaves correctly here (it retries, and a non-navigated attempt legitimately yields a basic context), so this is a test flake, not a product bug. The same
net::ERR_NO_BUFFER_SPACEfailure is already documented for three sibling tests (test_resource_management,test_adaptive_crawling_pre_nav_change_to_context,test_stagehand_browser_controller), which handle it with@pytest.mark.flaky(reruns=3).Rather than retry, this makes the assertion robust to spurious pre-navigation failures: it ignores attempts that never reached the page (
None) and asserts that at least one attempt did, and that every attempt that did exposes the page HTML. Removes the test's sensitivity to the flake deterministically while preserving what it verifies (that the error handler can read the page). No product code changes.