eolivelli commented on a change in pull request #8996:
URL: https://github.com/apache/pulsar/pull/8996#discussion_r549275906
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
##########
@@ -1079,7 +1092,7 @@ public void testDeactivatingBacklogConsumer() throws
Exception {
// 3. Consume messages: at Faster subscriber
for (int i = 0; i < totalMsgs; i++) {
msg = subscriber1.receive(100, TimeUnit.MILLISECONDS);
- subscriber1.acknowledge(msg);
+ subscriber1.acknowledgeAsync(msg);
Review comment:
do we have to wait for this operation to complete ?
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
##########
@@ -1802,7 +1816,7 @@ public void testUnackedBlockAtBatch(int
batchMessageDelayMs) throws Exception {
if (msg != null) {
messages.add(msg);
totalReceiveMessages++;
- consumer1.acknowledge(msg);
+ consumer1.acknowledgeAsync(msg);
Review comment:
do we have to wait for this operation to complete ?
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
##########
@@ -1397,13 +1412,7 @@ public void testConsumerBlockingWithUnAckedMessages()
throws Exception {
assertEquals(messages.size(), unAckedMessagesBufferSize);
// start acknowledging messages
- messages.forEach(m -> {
- try {
- consumer.acknowledge(m);
- } catch (PulsarClientException e) {
- fail("ack failed", e);
- }
- });
+ messages.forEach(consumer::acknowledgeAsync);
Review comment:
do we have to wait for this operation to complete and check the result ?
##########
File path:
pulsar-broker/src/test/java/org/apache/pulsar/client/api/SimpleProducerConsumerTest.java
##########
@@ -1098,7 +1111,7 @@ public void testDeactivatingBacklogConsumer() throws
Exception {
// 6. consume messages : at slower subscriber
for (int i = 0; i < totalMsgs; i++) {
msg = subscriber2.receive(100, TimeUnit.MILLISECONDS);
- subscriber2.acknowledge(msg);
+ subscriber2.acknowledgeAsync(msg);
Review comment:
do we have to wait for this operation to complete ?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]