Jason918 commented on a change in pull request #14000:
URL: https://github.com/apache/pulsar/pull/14000#discussion_r803479374
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/BacklogQuotaManagerTest.java
##########
@@ -475,10 +477,12 @@ public void testConsumerBacklogEvictionTimeQuota() throws
Exception {
rolloverStats();
stats = admin.topics().getStats(topic1);
+ PersistentTopic topic1Reference = (PersistentTopic)
pulsar.getBrokerService().getTopicReference(topic1).get();
+ ManagedLedgerImpl ml = (ManagedLedgerImpl)
topic1Reference.getManagedLedger();
// Messages on first 2 ledgers should be expired, backlog is number of
- // message in current ledger which should be 4.
- assertEquals(stats.getSubscriptions().get(subName1).getMsgBacklog(),
4);
- assertEquals(stats.getSubscriptions().get(subName2).getMsgBacklog(),
4);
+ // message in current ledger.
+ assertEquals(stats.getSubscriptions().get(subName1).getMsgBacklog(),
ml.getNumberOfEntries());
Review comment:
How would this verify the `BacklogQuota RetentionPolicy` like this ?
I think we should use `ml.getCurrentLedgerEntries` here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]