[fix][test] Flaky SameAuthParamsLookupAutoClusterFailoverTest#25566
Merged
merlimat merged 1 commit intoapache:masterfrom Apr 22, 2026
Merged
Conversation
…LookupAutoClusterFailoverTest Under CI load, the "Test recover 2 --> 1" step in testAutoClusterFailover could exceed its 60s awaitility budget because each recovery cycle sequentially probes every index up to currentPulsarServiceIndex with a 3s per-probe deadline, and recoverThreshold=5 requires five successful cycles. Transient probe failures reset the PreRecover counter, compounding delay. Tightening checkHealthyIntervalMs from 300ms to 100ms shortens the cycle cadence without weakening the threshold-based state machine — the full five-step PreRecover -> Healthy transition is still exercised.
nodece
approved these changes
Apr 22, 2026
dao-jun
approved these changes
Apr 22, 2026
merlimat
approved these changes
Apr 22, 2026
lhotari
added a commit
that referenced
this pull request
Apr 22, 2026
(cherry picked from commit 1071cc9)
lhotari
added a commit
that referenced
this pull request
Apr 22, 2026
(cherry picked from commit 1071cc9)
lhotari
added a commit
that referenced
this pull request
Apr 22, 2026
(cherry picked from commit 1071cc9)
srinath-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Apr 23, 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.
Fixes #24526
Motivation
The
SameAuthParamsLookupAutoClusterFailoverTest.testAutoClusterFailovertest is flaky. A prior fix (#25388) addressed one root cause (staleHealthystate infindFailoverTo), but the test still times out intermittently at the "Test recover 2 --> 1" step, where Awaitility waits up to 60s for state to reach[Failed, Healthy, Healthy].Root cause: with
checkHealthyIntervalMs(300)andrecoverThreshold(5), recovery of index 1 requires 5 successful probe cycles. Each cycle sequentially probes every index up tocurrentPulsarServiceIndex(so 3 probes per cycle oncecurrentIndex=2). Each probe is bounded by a 3s deadline inSameAuthParamsLookupAutoClusterFailover.probeAvailable(). Under CI load, the accumulated wall time (cycles × probes × per-probe time) can approach or exceed the 60s Awaitility budget — especially if a transient probe failure of index 1 resets the PreRecover counter, forcing another 5 cycles.Modifications
Reduce
checkHealthyIntervalMsfrom 300ms to 100ms in the test. This tightens the cycle cadence so recovery completes sooner without weakening the threshold-based state machine — the full five-stepPreRecover -> Healthytransition is still exercised.Verifying this change
This change is already covered by existing tests, such as
SameAuthParamsLookupAutoClusterFailoverTest.testAutoClusterFailover. Verified locally with@Test(invocationCount = 5)(10 runs total across bothenabledTlsvalues): 10/10 passes, each invocation consistent at ~16.5s (vs. the flaky runs that previously exceeded the 60s awaitility budget).Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc-not-needed