{{ message }}
Fix flaky timeouts in union race condition tests#102372
Merged
Merged
Conversation
The fixed-iteration loops could take varying amounts of wall-clock time depending on system load, causing flaky timeouts in CI. Replace them with `while [ $SECONDS -lt $TIMELIMIT ]` loops capped at 100 seconds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
kssenii
approved these changes
Apr 10, 2026
Member
There was a problem hiding this comment.
nit: TIMELIMIT is a bit difficult to read, may be TIME_LIMIT is better
Member
Author
There was a problem hiding this comment.
It's naming used in other tests with the exact same mechanic so I would prefer keeping it for now.
1 task
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.

Tests
00090,00091,00093,00094use fixed-iteration loops (10 x 100 queries) that cannot self-terminate before the test runner's 180-secondTOO_LONGthreshold. Under flaky check,ThreadFuzzerenables pthread mutex wrapping (50% CPU-migration probability per mutex op), inflating per-query latency 4-6x. Combined with the 14 new randomized query-plan settings from #101638, these tests exceed the timeout on ASan/Debug/Binary builds (100% failure rate on ASan).Sibling test
00092had the identical problem and was already fixed in #96976 by switching to aTIMELIMIT=$((SECONDS + 100))wall-clock loop. This PR applies the same pattern to the remaining four tests.Race detection is preserved: incorrect query results still cause
grepto match, printFail!, and break the loop, producing a reference file mismatch.CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100773&sha=43fb80eb293d22cd90d58702f50a018bd651934f&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20flaky%20check%29
Related: #100773, #95354
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Version info
26.4.1.809