Skip to content

[fix][test] Fix flaky IsolatedBookieEnsemblePlacementPolicyTest.testBookieInfoChange#25473

Open
merlimat wants to merge 1 commit intoapache:masterfrom
merlimat:fix/flaky-IsolatedBookieEnsemblePlacementPolicyTest-v2
Open

[fix][test] Fix flaky IsolatedBookieEnsemblePlacementPolicyTest.testBookieInfoChange#25473
merlimat wants to merge 1 commit intoapache:masterfrom
merlimat:fix/flaky-IsolatedBookieEnsemblePlacementPolicyTest-v2

Conversation

@merlimat
Copy link
Copy Markdown
Contributor

@merlimat merlimat commented Apr 3, 2026

Motivation

IsolatedBookieEnsemblePlacementPolicyTest.testBookieInfoChange is flaky because initialize() loads the bookie rack configuration asynchronously. When newEnsemble() runs before the async load completes, cachedRackConfiguration is null, no bookie isolation is applied, and the ensemble may include bookies from the wrong group.

Stack trace

IsolatedBookieEnsemblePlacementPolicyTest > testBookieInfoChange FAILED
    java.lang.AssertionError: expected [true] but found [false]
        at org.testng.Assert.fail(Assert.java:110)
        at org.testng.Assert.failNotEquals(Assert.java:1577)
        at org.testng.Assert.assertTrue(Assert.java:56)
        at org.testng.Assert.assertTrue(Assert.java:66)
        at IsolatedBookieEnsemblePlacementPolicyTest.testBookieInfoChange(IsolatedBookieEnsemblePlacementPolicyTest.java:390)

Modifications

Add an Awaitility wait after initialize() to ensure the async cache load has completed before calling newEnsemble().

Documentation

  • doc-not-needed

…ookieInfoChange

Add Awaitility wait for the async cache load triggered by initialize()
to complete before calling newEnsemble(). Without this, the
cachedRackConfiguration can be null, causing no bookie isolation and
the ensemble may include bookies from the wrong group.
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test doc-not-needed Your PR changes do not impact docs ready-to-test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants