nodece commented on code in PR #958:
URL: https://github.com/apache/pulsar-client-go/pull/958#discussion_r1111416873


##########
pulsar/producer_test.go:
##########
@@ -1737,3 +1737,46 @@ func TestExclusiveProducer(t *testing.T) {
        assert.Error(t, err, "Producer should be failed")
        assert.True(t, strings.Contains(err.Error(), "ProducerBusy"))
 }
+
+func TestWaitForExclusiveProducer(t *testing.T) {
+       client, err := NewClient(ClientOptions{
+               URL: serviceURL,
+               // Set the request timeout is 200ms
+               OperationTimeout: 200 * time.Millisecond,
+       })
+       assert.NoError(t, err)
+       defer client.Close()
+
+       topicName := newTopicName()
+       producer1, err := client.CreateProducer(ProducerOptions{
+               Topic:              topicName,
+               ProducerAccessMode: ProducerAccessModeExclusive,
+       })
+       assert.NoError(t, err)
+       assert.NotNil(t, producer1)
+       defer producer1.Close()

Review Comment:
   Sorry for do incorrect review. You should remove this line. 
   
   You already close this producer on line 1780.
   
   
   



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