This is an automated email from the ASF dual-hosted git repository.

penghui 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 4e1d8636346 [fix][test] Fix flaky SimpleBrokerStartTest.testNoNICSpeed 
(#24415)
4e1d8636346 is described below

commit 4e1d863634613f9e7dd13935138034712d9f1b69
Author: hanmz <[email protected]>
AuthorDate: Wed Jun 18 21:06:38 2025 +0800

    [fix][test] Fix flaky SimpleBrokerStartTest.testNoNICSpeed (#24415)
---
 .../pulsar/broker/loadbalance/SimpleBrokerStartTest.java       | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/SimpleBrokerStartTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/SimpleBrokerStartTest.java
index 31c8c9f3bcc..2e8499971a1 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/SimpleBrokerStartTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/SimpleBrokerStartTest.java
@@ -18,15 +18,12 @@
  */
 package org.apache.pulsar.broker.loadbalance;
 
-import static org.testng.Assert.assertTrue;
-import static org.testng.Assert.fail;
 import com.google.common.io.Resources;
 import java.nio.file.Files;
 import java.nio.file.Paths;
 import java.util.Optional;
 import lombok.Cleanup;
 import lombok.extern.slf4j.Slf4j;
-import org.apache.pulsar.broker.PulsarServerException;
 import org.apache.pulsar.broker.PulsarService;
 import org.apache.pulsar.broker.ServiceConfiguration;
 import org.apache.pulsar.broker.loadbalance.impl.SimpleLoadManagerImpl;
@@ -103,12 +100,7 @@ public class SimpleBrokerStartTest {
         if (!hasNicSpeeds) {
             @Cleanup
             PulsarService pulsarService = new PulsarService(config);
-            try {
-                pulsarService.start();
-                fail("unexpected behaviour");
-            } catch (PulsarServerException ex) {
-                assertTrue(ex.getCause() instanceof IllegalStateException);
-            }
+            pulsarService.start();
         }
     }
 

Reply via email to