test: Deflake adaptive crawler timeout test against slow CI browser navigation - #2207
Draft
vdusek wants to merge 2 commits into
Draft
test: Deflake adaptive crawler timeout test against slow CI browser navigation#2207vdusek wants to merge 2 commits into
vdusek wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2207 +/- ##
==========================================
- Coverage 93.74% 93.73% -0.01%
==========================================
Files 181 181
Lines 12852 12854 +2
==========================================
+ Hits 12048 12049 +1
- Misses 804 805 +1
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:
|
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_adaptive_playwright_crawler_timeout_in_sub_crawlerfails intermittently on Windows CI withExpected 'browser_handler' to be called once. Called 0 times.(example run).
The fallback browser request navigates under the Playwright sub-crawler's own
navigation_timeout(default 1 minute) - a budget separate from the request handler timeout the test already relaxes to
120s. On a saturated runner (8 xdist workers, each driving Chromium)
page.gotocan exceed it, andwith
max_request_retries=0that single slow navigation fails the only attempt before the handlerever runs.
The test now grants navigation the same 120s ceiling via
playwright_crawler_specific_kwargs. Topass that type-safely, the missing
navigation_timeoutkey is added to_PlaywrightCrawlerAdditionalOptions- typing only,PlaywrightCrawler.__init__already accepts it.Verified by deterministic fault injection (a playwright-only pre-navigation delay consuming the
shared navigation budget): a 70s navigation-phase delay reproduces the exact CI failure under the
default ceiling and passes under the 120s one. After the fix, 0/96 failures across 8 concurrent
Chromium-saturated lanes, and the adaptive + playwright test modules pass under
-n auto. Theassertions are unchanged.
✍️ Drafted by Claude Code