Skip to content

test: Fix flaky tests in adaptive crawler and sitemap loader#1847

Merged
vdusek merged 1 commit intomasterfrom
test/fix-flaky-tests-adaptive-and-sitemap
Apr 15, 2026
Merged

test: Fix flaky tests in adaptive crawler and sitemap loader#1847
vdusek merged 1 commit intomasterfrom
test/fix-flaky-tests-adaptive-and-sitemap

Conversation

@vdusek
Copy link
Copy Markdown
Collaborator

@vdusek vdusek commented Apr 15, 2026

Summary

  • Add @pytest.mark.flaky(rerun=3) to test_adaptive_context_query_selector_beautiful_soup — the parsel variant already had this marker for the same timing issue (Test test_adaptive_context_query_selector_parsel is flaky #1650), but the BeautifulSoup variant was missing it. The test relies on Playwright detecting a JS-injected <h2> within a 200ms window, which is racy on macOS/Windows CI.
  • Increase asyncio.wait_for timeout from 2s to 10s in test_data_persistence_for_sitemap_loading — on Windows CI with httpx, the HTTP client hit a connection error and started retrying, exhausting the 2-second window. The test validates data persistence, not latency.

Failed CI jobs:

🤖 Generated with Claude Code

Add @pytest.mark.flaky(rerun=3) to test_adaptive_context_query_selector_beautiful_soup
matching the parsel variant. Increase timeout in test_data_persistence_for_sitemap_loading
from 2s to 10s to avoid TimeoutError on Windows CI with httpx.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@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 Apr 15, 2026
@vdusek vdusek self-assigned this Apr 15, 2026
@vdusek vdusek requested a review from Pijukatel April 15, 2026 12:43
@github-actions github-actions bot added this to the 138th sprint - Tooling team milestone Apr 15, 2026
@github-actions github-actions bot added the tested Temporary label used only programatically for some analytics. label Apr 15, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 15, 2026

Codecov Report

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1847   +/-   ##
=======================================
  Coverage   92.34%   92.35%           
=======================================
  Files         157      157           
  Lines       10921    10921           
=======================================
+ Hits        10085    10086    +1     
+ Misses        836      835    -1     
Flag Coverage Δ
unit 92.35% <ø> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 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 merged commit e18d395 into master Apr 15, 2026
32 checks passed
@vdusek vdusek deleted the test/fix-flaky-tests-adaptive-and-sitemap branch April 15, 2026 12:58
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.

3 participants