You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/08/24 11:53:07 UTC
[GitHub] [pulsar] eolivelli commented on a diff in pull request #17161: [fix][test] Fix flaky test: PersistentStreamingDispatcherBlockConsumerTest.testBrokerDispatchBlockAndSubAckBackRequiredMsgs
eolivelli commented on code in PR #17161:
URL: https://github.com/apache/pulsar/pull/17161#discussion_r953699041
##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/DispatcherBlockConsumerTest.java:
##########
@@ -998,6 +999,11 @@ public void testBrokerDispatchBlockAndSubAckBackRequiredMsgs() {
* maxUnAckPerDispatcher limit
**/
consumer1Sub2 = (ConsumerImpl<byte[]>) pulsarClient.newConsumer().topic(topicName)
+ // in the scope of this test is important to not group acks because
+ // the ack for messages happens after receiving a new message from the topic.
+ // If the acks are sent in batch it may happen that the dispatcher is still blocked until
+ // it receives the batched acks and the Consumer#receive will return null.
+ .acknowledgmentGroupTime(0, TimeUnit.SECONDS)
Review Comment:
Using ackReceiptEnable can help as well.
Because you cam wait for the server to process the ack
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org