lhotari commented on code in PR #22454:
URL: https://github.com/apache/pulsar/pull/22454#discussion_r1555222724
##########
pulsar-broker/src/test/java/org/apache/pulsar/broker/service/persistent/PersistentTopicTest.java:
##########
@@ -708,4 +709,52 @@ public void testAddWaitingCursorsForNonDurable() throws
Exception {
assertEquals(ledger.getWaitingCursorsCount(), 0);
});
}
+
+ @Test
+ public void testAddWaitingCursorsForNonDurable2() throws Exception {
+ final String ns = "prop/ns-test";
+ admin.namespaces().createNamespace(ns, 2);
+ final String topicName =
"persistent://prop/ns-test/testAddWaitingCursors2";
+ admin.topics().createNonPartitionedTopic(topicName);
+ pulsarClient.newConsumer(Schema.STRING).topic(topicName)
+ .subscriptionMode(SubscriptionMode.Durable)
+ .subscriptionType(SubscriptionType.Shared)
+ .subscriptionName("sub-1").subscribe().close();
+ @Cleanup
+ final Producer<String> producer =
pulsarClient.newProducer(Schema.STRING).topic(topicName).create();
+ for (int i = 0; i < 2_000; i ++) {
+ producer.send("test-" + i);
Review Comment:
+1
I guess disabling batching makes sense since backlog is counted in entries.
to further reduce the test time, it would be possible to also adjust the
config of `managedLedgerCursorBackloggedThreshold` since less messages would be
required to reproduce the issue.
```
@Override
protected void doInitConf() throws Exception {
super.doInitConf();
this.conf.setManagedLedgerCursorBackloggedThreshold(10);
}
```
--
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]