PavelZeger commented on code in PR #1507:
URL: https://github.com/apache/pulsar-client-go/pull/1507#discussion_r3375894587


##########
pulsar/consumer_test.go:
##########
@@ -6441,3 +6441,234 @@ func TestIsNonRetriableSubscribeError(t *testing.T) {
                })
        }
 }
+
+func drainUntilTimeout(t *testing.T, consumer Consumer, perMsgTimeout 
time.Duration) int {
+       t.Helper()
+       count := 0
+       for {
+               ctx, cancel := context.WithTimeout(context.Background(), 
perMsgTimeout)
+               msg, err := consumer.Receive(ctx)
+               cancel()
+               if err != nil {
+                       return count
+               }
+
+               ackErr := consumer.Ack(msg)
+               if ackErr != nil {
+                       return 0
+               }

Review Comment:
   Addressed in the latest commit



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