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 2021/06/28 11:13:36 UTC

[pulsar] branch master updated: fix flaky test testBrokerRanking (#11114)

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 5e4cbb6  fix flaky test testBrokerRanking (#11114)
5e4cbb6 is described below

commit 5e4cbb638bcaab9fcd6876d1cab87c3289b7f2df
Author: hangc0276 <ch...@apache.org>
AuthorDate: Mon Jun 28 19:12:57 2021 +0800

    fix flaky test testBrokerRanking (#11114)
---
 .../java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java
index 175a1eb..64e0a63 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/loadbalance/LoadBalancerTest.java
@@ -303,7 +303,7 @@ public class LoadBalancerTest {
      * bottleneck, for the 4/5th brokers CPU become bottleneck since memory is big enough - non-bundles assigned so all
      * idle resources are available for new bundle Check the broker rankings are the load percentage of each broker.
      */
-    @Test
+    @Test(timeOut = 30000)
     public void testBrokerRanking() throws Exception {
         for (int i = 0; i < BROKER_COUNT; i++) {
             LoadReport lr = new LoadReport();
@@ -322,7 +322,7 @@ public class LoadBalancerTest {
 
         for (int i = 0; i < BROKER_COUNT; i++) {
             Method updateRanking = Whitebox.getMethod(SimpleLoadManagerImpl.class, "updateRanking");
-            updateRanking.invoke(pulsarServices[0].getLoadManager().get());
+            updateRanking.invoke(pulsarServices[i].getLoadManager().get());
         }
 
         // check the ranking result