test: Fix flaky tests in adaptive crawler and sitemap loader#1847
Merged
test: Fix flaky tests in adaptive crawler and sitemap loader#1847
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Pijukatel
approved these changes
Apr 15, 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.
Summary
@pytest.mark.flaky(rerun=3)totest_adaptive_context_query_selector_beautiful_soup— the parsel variant already had this marker for the same timing issue (Testtest_adaptive_context_query_selector_parselis 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.asyncio.wait_fortimeout from 2s to 10s intest_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