This is an automated email from the ASF dual-hosted git repository. technoboy 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 0c6ba1cf72f [fix][test] Flaky-test: BrokerServiceTest.testShutDownWithMaxConcurrentUnload (#24769) 0c6ba1cf72f is described below commit 0c6ba1cf72fb12b9a97e3f8438d5c34a5918fb69 Author: Yike Xiao <km...@live.com> AuthorDate: Sat Sep 20 18:46:19 2025 +0800 [fix][test] Flaky-test: BrokerServiceTest.testShutDownWithMaxConcurrentUnload (#24769) --- .../test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java index c73acfe9ee8..49f5d7c5c36 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BrokerServiceTest.java @@ -179,10 +179,11 @@ public class BrokerServiceTest extends BrokerTestBase { assertEquals(bundlesData.getNumBundles(), bundleNum); List<String> list = admin.brokers().getActiveBrokers("test"); assertEquals(list.size(), 1); + BrokerService brokerService = pulsar.getBrokerService(); admin.brokers().shutDownBrokerGracefully(1, false); //We can only unload one bundle per second, so it takes at least 2 seconds. Awaitility.await().atLeast(bundleNum - 1, TimeUnit.SECONDS).untilAsserted(() -> { - assertEquals(pulsar.getBrokerService().getTopics().size(), 0); + assertEquals(brokerService.getTopics().size(), 0); }); Awaitility.await().atMost(60, TimeUnit.SECONDS).untilAsserted(() -> { assertNull(pulsar.getBrokerService());