nicoloboschi commented on code in PR #17161:
URL: https://github.com/apache/pulsar/pull/17161#discussion_r958831120


##########
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:
   @eolivelli `ackReceiptEnable` would also work but it slows down the test a 
lot (5 secs vs 1 min) so I'd prefer to disable the ack grouping. For the scope 
of the test this is irrelevant 



-- 
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]

Reply via email to