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


##########
pulsar-function-go/pf/instanceConf_test.go:
##########
@@ -96,3 +98,18 @@ func TestInstanceConf_GetInstanceName(t *testing.T) {
 
        assert.Equal(t, "101", instanceName)
 }
+
+func TestInstanceConf_Fail(t *testing.T) {
+       assert.Panics(t, func() {
+               newInstanceConfWithConf(&cfg.Conf{ProcessingGuarantees: 0, 
AutoACK: false})
+       }, "Should have a panic")
+       assert.Panics(t, func() {
+               newInstanceConfWithConf(&cfg.Conf{ProcessingGuarantees: 1, 
AutoACK: false})
+       }, "Should have a panic")
+       assert.Panics(t, func() {
+               newInstanceConfWithConf(&cfg.Conf{ProcessingGuarantees: 2})
+       }, "Should have a panic")

Review Comment:
   It's more like a bug fix, In `go` instance, it does not support 
`exactly-once`. It was not checked at startup before, which will cause the 
function to not ack any message. `python` instance has the same problem.
   



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