Skip to content

Commit

Permalink
Use consistent tokens view in flaky RGUsageMTAggrWaitForAllMsgsTest
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Feb 8, 2025
1 parent e4f4689 commit 42fb876
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.Map;
import java.util.concurrent.TimeUnit;
import lombok.extern.slf4j.Slf4j;
import org.apache.pulsar.broker.qos.AsyncTokenBucket;
import org.apache.pulsar.broker.resourcegroup.ResourceGroup.BytesAndMessagesCount;
import org.apache.pulsar.broker.resourcegroup.ResourceGroup.ResourceGroupMonitoringClass;
import org.apache.pulsar.broker.resourcegroup.ResourceGroupService.ResourceGroupUsageStatsType;
Expand Down Expand Up @@ -58,9 +59,10 @@
@Slf4j
@Test(groups = "flaky")
public class RGUsageMTAggrWaitForAllMsgsTest extends ProducerConsumerBase {
@BeforeClass
@BeforeClass(alwaysRun = true)
@Override
protected void setup() throws Exception {
AsyncTokenBucket.switchToConsistentTokensView();
super.internalSetup();
this.prepareForOps();

Expand Down Expand Up @@ -91,6 +93,7 @@ public long computeLocalQuota(long confUsage, long myUsage, long[] allUsages) {
@Override
protected void cleanup() throws Exception {
super.internalCleanup();
AsyncTokenBucket.resetToDefaultEventualConsistentTokensView();
}

@Test
Expand Down

0 comments on commit 42fb876

Please sign in to comment.