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


##########
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:
   Does this will introduce break change? If users upgrade to the new version 
but with the old configs.



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