hrsakai commented on a change in pull request #126:
URL: https://github.com/apache/pulsar-client-node/pull/126#discussion_r497998526



##########
File path: tests/producer.test.js
##########
@@ -56,6 +56,24 @@ const Pulsar = require('../index.js');
           batchingEnabled: true,
         })).rejects.toThrow('Failed to create producer: ConnectError');
       });
+
+      test('Producer Name', async () => {
+        const producer = await client.createProducer({
+          topic: 'persistent://public/default/topic',
+        });
+
+        expect(typeof producer.getProducerName()).toBe('string');

Review comment:
       @alanhoff 
   
   Thank you for your contribution.
   
   [nits]
   Could you set producerName and check that string?
   
   e.g.
   ```
           const producer = await client.createProducer({
             topic: 'persistent://public/default/topic',
             producerName: 'aaaaa'
           });
   
   expect(producer.getProducerName()).toBe('aaaaa');
   ```




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

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


Reply via email to