You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "CrazyCollin (via GitHub)" <gi...@apache.org> on 2023/03/09 03:26:23 UTC

[GitHub] [pulsar-client-go] CrazyCollin commented on a diff in pull request #987: [feat] Expose the chunk config of consumer to the reader

CrazyCollin commented on code in PR #987:
URL: https://github.com/apache/pulsar-client-go/pull/987#discussion_r1130364401


##########
pulsar/reader_test.go:
##########
@@ -70,6 +70,49 @@ func TestReaderConfigSubscribeName(t *testing.T) {
 	assert.NotNil(t, consumer)
 }
 
+func TestReaderConfigChunk(t *testing.T) {
+	client, err := NewClient(ClientOptions{
+		URL: lookupURL,
+	})
+	if err != nil {
+		t.Fatal(err)
+	}
+	defer client.Close()
+
+	consumer1, err := client.CreateReader(ReaderOptions{
+		Topic:                       "my-topic1",
+		StartMessageID:              EarliestMessageID(),
+		MaxPendingChunkedMessage:    50,
+		ExpireTimeOfIncompleteChunk: 30 * time.Second,
+		AutoAckIncompleteChunk:      true,
+	})
+	if err != nil {
+		t.Fatal(err)
+	}

Review Comment:
   Thank you for your advice, but a little confused to me, shouldn't `assert.Nil` be used here? 



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org