You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by mm...@apache.org on 2026/04/05 13:44:41 UTC
(pulsar) branch master updated: [fix][test] Fix flaky IsolatedBookieEnsemblePlacementPolicyTest.testBookieInfoChange (#25473)
This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 33166b4867f [fix][test] Fix flaky IsolatedBookieEnsemblePlacementPolicyTest.testBookieInfoChange (#25473)
33166b4867f is described below
commit 33166b4867fc663221a231ec280a14e9bda45046
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Sun Apr 5 06:44:34 2026 -0700
[fix][test] Fix flaky IsolatedBookieEnsemblePlacementPolicyTest.testBookieInfoChange (#25473)
---
.../rackawareness/IsolatedBookieEnsemblePlacementPolicyTest.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pulsar-broker-common/src/test/java/org/apache/pulsar/bookie/rackawareness/IsolatedBookieEnsemblePlacementPolicyTest.java b/pulsar-broker-common/src/test/java/org/apache/pulsar/bookie/rackawareness/IsolatedBookieEnsemblePlacementPolicyTest.java
index 713d286660e..d3fae728483 100644
--- a/pulsar-broker-common/src/test/java/org/apache/pulsar/bookie/rackawareness/IsolatedBookieEnsemblePlacementPolicyTest.java
+++ b/pulsar-broker-common/src/test/java/org/apache/pulsar/bookie/rackawareness/IsolatedBookieEnsemblePlacementPolicyTest.java
@@ -385,6 +385,11 @@ public class IsolatedBookieEnsemblePlacementPolicyTest {
NullStatsLogger.INSTANCE, BookieSocketAddress.LEGACY_BOOKIEID_RESOLVER);
isolationPolicy.onClusterChanged(writableBookies, readOnlyBookies);
+ // Wait for the async cache load triggered by initialize() to complete
+ Awaitility.await().atMost(Duration.ofSeconds(5)).untilAsserted(() ->
+ assertNotNull(isolationPolicy.getBookieMappingCache()
+ .getIfCached(BookieRackAffinityMapping.BOOKIE_INFO_ROOT_PATH)));
+
List<BookieId> ensemble = isolationPolicy.newEnsemble(2, 2, 2,
Collections.emptyMap(), new HashSet<>()).getResult();
assertTrue(ensemble.contains(new BookieSocketAddress(BOOKIE1).toBookieId()));