lordcheng10 commented on a change in pull request #12469:
URL: https://github.com/apache/pulsar/pull/12469#discussion_r736163522



##########
File path: 
pulsar-client/src/test/java/org/apache/pulsar/client/impl/ConsumerImplTest.java
##########
@@ -187,4 +187,17 @@ public void testBatchReceiveAsyncCanBeCancelled() {
         // then
         Assert.assertFalse(consumer.hasPendingBatchReceive());
     }
+
+    @Test
+    public void testClose() {
+        Exception checkException = null;
+        try {
+            if (consumer != null) {
+                consumer.close();
+            }
+        } catch (Exception e) {
+            checkException = e;
+        }
+        Assert.assertNull(checkException);

Review comment:
       I resubmitted the modification: close Consumer after calling 
consumer.negativeAcknowledge:
       @Test
       public void testClose() {
           Exception checkException = null;
           try {
               if (consumer != null) {
                   consumer.negativeAcknowledge(new MessageIdImpl(-1, -1, -1));
                   consumer.close();
               }
           } catch (Exception e) {
               checkException = e;
           }
           Assert.assertNull(checkException);
       }




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