You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2021/07/07 03:53:22 UTC
[pulsar] 04/07: fix flaky test testBrokerRanking (#11114)
This is an automated email from the ASF dual-hosted git repository.
penghui pushed a commit to branch branch-2.8
in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 1eaade391f9eaff0a745ecf025a5a2d5a362e0c6
Author: hangc0276 <ch...@apache.org>
AuthorDate: Mon Jun 28 19:12:57 2021 +0800
fix flaky test testBrokerRanking (#11114)
(cherry picked from commit 5e4cbb638bcaab9fcd6876d1cab87c3289b7f2df)
---
.../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