Skip to content

[fix][test] Extend SameAuthParamsLookupAutoClusterFailoverTest phase timeouts - #25563

Merged
lhotari merged 1 commit into
apache:masterfrom
merlimat:fix/same-auth-params-timeout
Apr 22, 2026
Merged

[fix][test] Extend SameAuthParamsLookupAutoClusterFailoverTest phase timeouts#25563
lhotari merged 1 commit into
apache:masterfrom
merlimat:fix/same-auth-params-timeout

Conversation

@merlimat

Copy link
Copy Markdown
Contributor

Motivation

SameAuthParamsLookupAutoClusterFailoverTest.testAutoClusterFailover drives three state-convergence phases — failover 0->2, recover 2->1, recover 1->0 — each bounded by Awaitility.await().atMost(60, SECONDS). The probe timeout inside SameAuthParamsLookupAutoClusterFailover is 3 seconds and recoverThreshold is 5, so a single slow or failing probe per iteration can stretch one phase close to 30 seconds. On slow CI agents the cumulative variance pushes the final phase past 60 seconds and the test fails with ConditionTimeoutException.

Example failure

Gradle suite > Gradle test > org.apache.pulsar.broker.SameAuthParamsLookupAutoClusterFailoverTest > testAutoClusterFailover[4](false) FAILED
    org.awaitility.core.ConditionTimeoutException: Assertion condition expected [true] but found [false] within 1 minutes.
        at app//org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
        at app//org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
        at app//org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
        at app//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:985)
        at app//org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:769)
        at app//org.apache.pulsar.broker.SameAuthParamsLookupAutoClusterFailoverTest.testAutoClusterFailover(SameAuthParamsLookupAutoClusterFailoverTest.java:154)

        Caused by:
        java.lang.AssertionError: expected [true] but found [false]
            at org.testng.Assert.assertTrue(Assert.java:56)
            at org.testng.Assert.assertTrue(Assert.java:66)
            at org.apache.pulsar.broker.SameAuthParamsLookupAutoClusterFailoverTest.lambda$testAutoClusterFailover$8(SameAuthParamsLookupAutoClusterFailoverTest.java:162)

Modifications

  • Raise each Awaitility.atMost from 60s to 120s so a single phase can still complete even when every check cycle is stretched by slow probes.
  • Raise the overall test timeOut from 240s to 480s so the three per-phase budgets still fit comfortably along with setup and teardown.
  • Add a comment explaining the sizing decision.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is already covered by existing tests, specifically SameAuthParamsLookupAutoClusterFailoverTest.testAutoClusterFailover.

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

…timeouts

The integration test drives three state-convergence phases (failover 0->2,
recover 2->1, recover 1->0) each bounded by Awaitility.atMost(60s). The probe
timeout is 3 seconds and recoverThreshold is 5, so one slow/failing probe per
iteration can stretch a single phase close to 30 seconds; on slow CI agents
that cumulative variance pushes the 1->0 phase past 60 seconds and the test
fails with ConditionTimeoutException.

Raise each phase to 120 seconds and raise the overall test timeout from 240s
to 480s so the per-phase budgets still fit.

@lhotari lhotari left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lhotari
lhotari merged commit 43c7ad8 into apache:master Apr 22, 2026
80 of 82 checks passed
lhotari pushed a commit that referenced this pull request Apr 22, 2026
lhotari pushed a commit that referenced this pull request Apr 22, 2026
lhotari pushed a commit that referenced this pull request Apr 22, 2026
@merlimat
merlimat deleted the fix/same-auth-params-timeout branch April 22, 2026 12:50
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Apr 23, 2026
…timeouts (apache#25563)

(cherry picked from commit 43c7ad8)
(cherry picked from commit 8294e3e)
poorbarcode pushed a commit to poorbarcode/pulsar that referenced this pull request May 6, 2026
nodece pushed a commit to ascentstream/pulsar that referenced this pull request May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants