Skip to content

Commit

Permalink
fix flaky test testBrokerRanking (#11114)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5e4cbb6)
  • Loading branch information
hangc0276 authored and codelipenghui committed Jul 7, 2021
1 parent 6430c54 commit 1eaade3
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -303,7 +303,7 @@ private void printSortedRanking(AtomicReference<Map<Long, Set<ResourceUnit>>> so
* 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();
Expand All @@ -322,7 +322,7 @@ public void testBrokerRanking() throws Exception {

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
Expand Down

0 comments on commit 1eaade3

Please sign in to comment.