Skip to content

test: Deflake adaptive crawler timeout test against slow CI browser navigation - #2207

Draft
vdusek wants to merge 2 commits into
masterfrom
test/deflake-adaptive-sub-crawler-timeout
Draft

test: Deflake adaptive crawler timeout test against slow CI browser navigation#2207
vdusek wants to merge 2 commits into
masterfrom
test/deflake-adaptive-sub-crawler-timeout

Conversation

@vdusek

@vdusek vdusek commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

test_adaptive_playwright_crawler_timeout_in_sub_crawler fails intermittently on Windows CI with
Expected '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.goto can exceed it, and
with max_request_retries=0 that single slow navigation fails the only attempt before the handler
ever runs.

The test now grants navigation the same 120s ceiling via playwright_crawler_specific_kwargs. To
pass that type-safely, the missing navigation_timeout key 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. The
assertions are unchanged.

✍️ 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 Sep 1, 2026
@vdusek vdusek self-assigned this Sep 1, 2026
@github-actions github-actions Bot added this to the 148th sprint - Tooling team milestone Sep 1, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label Sep 1, 2026
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.73%. Comparing base (7e71d70) to head (c7df284).

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     
Flag Coverage Δ
unit 93.73% <100.00%> (-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.

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. tested Temporary label used only programatically for some analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants