diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java index 9b45c0082e944f..e60486b3441824 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java @@ -111,7 +111,7 @@ void setup() throws Exception { config.setBrokerServicePort(Optional.of(0)); config.setAuthorizationEnabled(false); config.setAuthenticationEnabled(false); - config.setBacklogQuotaCheckIntervalInSeconds(TIME_TO_CHECK_BACKLOG_QUOTA / 2); + config.setBacklogQuotaCheckIntervalInSeconds(TIME_TO_CHECK_BACKLOG_QUOTA); config.setManagedLedgerMaxEntriesPerLedger(MAX_ENTRIES_PER_LEDGER); config.setManagedLedgerMinLedgerRolloverTimeMinutes(0); config.setAllowAutoTopicCreationType("non-partitioned"); @@ -528,7 +528,7 @@ public void testConsumerBacklogEvictionTimeQuota() throws Exception { } @Test(timeOut = 60000) - public void testConsumerBacklogEvictionTimeQuotaWithoutEviction() throws Exception { + public void testConsumerBacklogEvictionTimeQuotaWithPartEviction() throws Exception { assertEquals(admin.namespaces().getBacklogQuotaMap("prop/ns-quota"), new HashMap<>()); admin.namespaces().setBacklogQuota("prop/ns-quota", @@ -559,7 +559,7 @@ public void testConsumerBacklogEvictionTimeQuotaWithoutEviction() throws Excepti assertEquals(stats.getSubscriptions().get(subName2).getMsgBacklog(), 5); // Sleep 5000 mills for first 5 messages. - Thread.sleep(5000l); + Thread.sleep(5000L); numMsgs = 9; for (int i = 0; i < numMsgs; i++) { producer.send(content); @@ -568,7 +568,7 @@ public void testConsumerBacklogEvictionTimeQuotaWithoutEviction() throws Excepti } // The first 5 messages are expired after sleeping 2000 more mills. - Thread.sleep(2000l); + Thread.sleep(2000L); rolloverStats(); TopicStats stats2 = getTopicStats(topic1);