This is an automated email from the ASF dual-hosted git repository.
bogong pushed a commit to branch branch-2.9
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.9 by this push:
new 642c1ee1833 [fix][flaky-test] Fix
BacklogQuotaManagerTest.testConsumerBacklogEvictionTimeQuotaWithEmptyLedger
(#16735)
642c1ee1833 is described below
commit 642c1ee1833aebe6e50c55af5d1c15177388a8b8
Author: Zixuan Liu <[email protected]>
AuthorDate: Tue Jul 26 00:10:25 2022 +0800
[fix][flaky-test] Fix
BacklogQuotaManagerTest.testConsumerBacklogEvictionTimeQuotaWithEmptyLedger
(#16735)
(cherry picked from commit 70530d4d479ea3d4574b9f383ea5edd0fa978d64)
---
.../org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java | 6 ++++++
1 file changed, 6 insertions(+)
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 c824683f09f..63932a09f7a 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
@@ -528,6 +528,12 @@ public class BacklogQuotaManagerTest {
assertEquals(internalStats.ledgers.get(1).entries, 0);
});
+ Awaitility.await().untilAsserted(() -> {
+ PersistentTopicInternalStats internalStats =
admin.topics().getInternalStats(topic);
+ assertEquals(internalStats.ledgers.size(), 2);
+ assertEquals(internalStats.ledgers.get(1).entries, 0);
+ });
+
TopicStats stats = admin.topics().getStats(topic);
assertEquals(stats.getSubscriptions().get(subName).getMsgBacklog(), 1);