BewareMyPower commented on code in PR #903:
URL: https://github.com/apache/pulsar-client-go/pull/903#discussion_r1058310298


##########
pulsar/impl_message_test.go:
##########
@@ -80,6 +80,12 @@ func TestAckTracker(t *testing.T) {
 
        }
        assert.Equal(t, true, tracker.completed())
+
+       // test large number 1000 cumulative
+       tracker = newAckTracker(1000)
+
+       assert.Equal(t, true, tracker.ackCumulative(999))

Review Comment:
   It's better to add a test to verify `ackCumulative` for 0 to 998 returns 
false.
   
   ```golang
           tracker = newAckTracker(1000)
           for i := 0; i < 999; i++ {
                   assert.False(t, tracker.ackCumulative(i))
           }
           assert.False(t, tracker.completed())
   ```



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