Skip to content

Commit

Permalink
[fix][broker]unify time unit at dropping the backlog on a topic
Browse files Browse the repository at this point in the history
  • Loading branch information
HQebupt committed Oct 7, 2022
1 parent b297fa9 commit 7da7c9f
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 7da7c9f

Please sign in to comment.