merlimat opened a new pull request, #25473:
URL: https://github.com/apache/pulsar/pull/25473

   ## 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
   - [x] `doc-not-needed`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to