Repository navigation
Conversation
…ption progresses The test publishes 50 CSV messages and then polls `SELECT * FROM rabbitmq` against a fixed `DEFAULT_TIMEOUT_SEC` (60s) wall-clock deadline that is never extended. On a contended sanitizer runner the 50 rows can take longer than 60s to fully arrive, so the loop hits its deadline mid-consumption and calls `pytest.fail`, even though the test is still steadily consuming and would have passed shortly after. CI confirms this: the failing 6/6 ASan batch run reran the single test in isolation and it passed in 65.27s, just past the 60s budget. CIDB shows 14 such timeouts (test.py:312) in 30 days across 11 unrelated PRs and 3 master runs, spanning amd_asan_ubsan, amd_msan, arm_binary and amd_llvm_coverage builds. Fix: reset the no-progress deadline to `now + DEFAULT_TIMEOUT_SEC` whenever the accumulated result grows, so the loop waits as long as rows keep arriving and fails only after a genuine `DEFAULT_TIMEOUT_SEC`-long stall. This mirrors the progress-based deadline already used by `check_expected_result_polling` for the same class of flakiness (see "Fix flaky test_rabbitmq_big_message"), and preserves the test's ability to detect a stalled consumer. A virtual-clock simulation of a slow runner reproduces the failure with the old loop (FAIL at ~60s) and passes with the new loop (at 65s/120s), while a never-delivering consumer still fails at ~60s. The real integration test passes locally (1 passed in 137.27s). Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate
Session id: cron:clickhouse-worker-slot-0:20260623-025300 |
|
cc @alexey-milovidov — review per your request on #108014. Test-only fix: the CSV poll loop now resets its no-progress deadline while rows keep arriving, so a slow-but-progressing consumer on a contended sanitizer runner is no longer abandoned at the fixed 60s budget; the final correctness assertion is unchanged. |
|
Workflow [PR], commit [c339789] Summary: ❌
AI ReviewSummaryThis PR changes Final VerdictStatus: ✅ Approve |
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 353 line(s), 25 function(s) across 128 file(s) · Details Top files
|
|
CI fully finished on Two reds remain, both NOT caused by this change:
|
|
Superseded by #108364 (merged 2026-06-24), which fixes the same That PR factors the inline direct-select poll loop into a shared The flaky test is now fixed on master. Thanks @pamarcos. |
No related open issue found.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Fix the flaky integration test
test_storage_rabbitmq/test.py::test_rabbitmq_csv_with_delimiter.The test publishes 50 CSV messages and polls
SELECT * FROM rabbitmqagainst a fixedDEFAULT_TIMEOUT_SEC(60s) wall-clock deadline that is never extended. On a contended sanitizer runner the 50 rows can take longer than 60s to fully arrive, so the loop hits its deadline mid-consumption and callspytest.fail, even though it is still steadily consuming and would have passed shortly after. The CI run that prompted this fix reran the single test in isolation and it passed in 65.27s, just past the 60s budget.CIDB shows 14 such timeouts (
test.py:312) in 30 days across 11 unrelated PRs and 3 master runs, spanningamd_asan_ubsan,amd_msan,arm_binaryandamd_llvm_coveragebuilds. A recent example:Integration tests (amd_asan_ubsan, db disk, old analyzer, 6/6), https://s3.amazonaws.com/clickhouse-test-reports/json.html?REF=master&sha=2a3a502d2ed&name_0=MasterCI&name_1=Integration%20tests%20%28amd_asan_ubsan%2C%20db%20disk%2C%20old%20analyzer%2C%206%2F6%29Fix: reset the no-progress deadline to
now + DEFAULT_TIMEOUT_SECwhenever the accumulated result grows, so the loop waits as long as rows keep arriving and fails only after a genuineDEFAULT_TIMEOUT_SEC-long stall. This mirrors the progress-based deadline already used bycheck_expected_result_pollingfor the same class of flakiness, and preserves the test's ability to detect a stalled consumer.Validation (timing flake, so the failing direction is shown via a virtual-clock simulation of a slow runner): old loop FAILs at ~60s, new loop passes at 65s/120s, and a never-delivering consumer still FAILs at ~60s (genuine-stall detection intact). The real integration test passes locally (
1 passed in 137.27s).