This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new 64b96c2  Add more test case for BatchReceivePolicy. (#8587)
64b96c2 is described below

commit 64b96c2752d3bff38bc6eaf73f789c8104fdf78b
Author: lipenghui <[email protected]>
AuthorDate: Tue Nov 17 17:36:35 2020 +0800

    Add more test case for BatchReceivePolicy. (#8587)
---
 .../pulsar/client/api/ConsumerBatchReceiveTest.java      | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ConsumerBatchReceiveTest.java
 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ConsumerBatchReceiveTest.java
index 5857221..bb2faec 100644
--- 
a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ConsumerBatchReceiveTest.java
+++ 
b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/ConsumerBatchReceiveTest.java
@@ -170,6 +170,22 @@ public class ConsumerBatchReceiveTest extends 
ProducerConsumerBase {
                         .maxNumBytes(-100)
                         .timeout(50, TimeUnit.MILLISECONDS)
                         .build(), false, 30
+                },
+                // Only timeout present
+                {
+                    BatchReceivePolicy.builder()
+                            .maxNumMessages(0)
+                            .maxNumBytes(0)
+                            .timeout(50, TimeUnit.MILLISECONDS)
+                            .build(), false, 30
+                },
+                // Only timeout present
+                {
+                        BatchReceivePolicy.builder()
+                                .maxNumMessages(-1)
+                                .maxNumBytes(-1)
+                                .timeout(50, TimeUnit.MILLISECONDS)
+                                .build(), false, 30
                 }
         };
     }

Reply via email to