Skip to content

test: Mark test_http_status_statistics as flaky#1869

Merged
vdusek merged 1 commit intomasterfrom
test/flaky-http-status-statistics
May 6, 2026
Merged

test: Mark test_http_status_statistics as flaky#1869
vdusek merged 1 commit intomasterfrom
test/flaky-http-status-statistics

Conversation

@vdusek
Copy link
Copy Markdown
Collaborator

@vdusek vdusek commented May 4, 2026

Summary

test_http_status_statistics[httpx] failed intermittently on macOS Python 3.12 CI (example run) with '500': 39 vs expected '500': 40.

Each status/500 URL gets 4 attempts (1 initial + 3 retries from max_request_retries=3). The httpx client only calls register_status_code after a successful response (_httpx.py:175); a transient transport error (TCP reset / h2 stream hiccup, common on macOS-hosted runners under load) raises before that line, so the retry budget is consumed without bumping the counter — yielding 39 instead of 40.

Production behavior is correct; only the test's exact-count assumption is fragile under CI network noise. Marking the test with @pytest.mark.flaky(reruns=3, ...) follows the existing convention used for the same class of flake (e.g. test_basic_crawler.py:1376).

Transient transport errors in macOS CI can consume the retry budget without
reaching register_status_code, causing the exact-count assertion to fail
(39 vs 40 for status 500). Reuses the existing flaky-rerun convention used
elsewhere in the suite for CI-environment-induced flakes.
@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 May 4, 2026
@vdusek vdusek self-assigned this May 4, 2026
@github-actions github-actions Bot added this to the 140th sprint - Tooling team milestone May 4, 2026
@github-actions github-actions Bot added the tested Temporary label used only programatically for some analytics. label May 4, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.49%. Comparing base (cbe4699) to head (18aa825).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1869      +/-   ##
==========================================
+ Coverage   92.43%   92.49%   +0.05%     
==========================================
  Files         158      158              
  Lines       11027    11027              
==========================================
+ Hits        10193    10199       +6     
+ Misses        834      828       -6     
Flag Coverage Δ
unit 92.49% <ø> (+0.05%) ⬆️

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 0fdc362 into master May 6, 2026
30 of 32 checks passed
@vdusek vdusek deleted the test/flaky-http-status-statistics branch May 6, 2026 08:54
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