shibd commented on code in PR #17318:
URL: https://github.com/apache/pulsar/pull/17318#discussion_r990962347


##########
pulsar-broker/src/test/java/org/apache/pulsar/client/api/MultiTopicsConsumerTest.java:
##########
@@ -193,4 +194,42 @@ public void 
testShouldMaintainOrderForIndividualTopicInMultiTopicsConsumer()
         }
         Assert.assertEquals(numPartitions * numMessages, receivedCount);
     }
+
+    @Test
+    public void testBatchReceiveAckTimeout()
+            throws PulsarAdminException, PulsarClientException, 
InterruptedException {
+        String topicName = newTopicName();
+        int numPartitions = 2;
+        int numMessages = 100000;
+        admin.topics().createPartitionedTopic(topicName, numPartitions);
+
+        Producer<Long> producer = pulsarClient.newProducer(Schema.INT64)
+                .topic(topicName)
+                .enableBatching(false)
+                .blockIfQueueFull(true)
+                .create();
+
+        @Cleanup
+        Consumer<Long> consumer = pulsarClient
+                .newConsumer(Schema.INT64)
+                .topic(topicName)
+                .receiverQueueSize(numMessages)
+                .batchReceivePolicy(
+                        
BatchReceivePolicy.builder().maxNumMessages(1).timeout(2, 
TimeUnit.SECONDS).build()
+                ).ackTimeout(1000, TimeUnit.MILLISECONDS)
+                .subscriptionName(methodName)
+                .subscribe();
+
+        producer.newMessage()
+                .value(1l)
+                .send();
+        Thread.sleep(300);

Review Comment:
   Oh, Sorry, I forgot to remove it.



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