massakam commented on a change in pull request #101:
URL: https://github.com/apache/pulsar-client-node/pull/101#discussion_r449416195



##########
File path: tests/end_to_end.test.js
##########
@@ -116,6 +116,52 @@ const Pulsar = require('../index.js');
       await client.close();
     });
 
+    test('getRedeliveryCount', async () => {
+      const client = new Pulsar.Client({
+        serviceUrl: 'pulsar://localhost:6650',
+        operationTimeoutSeconds: 30,
+      });
+
+      const topic = 'persistent://public/default/produce-consume';
+      const producer = await client.createProducer({
+        topic,
+        sendTimeoutMs: 30000,
+        batchingEnabled: true,
+      });
+      expect(producer).not.toBeNull();
+
+      const consumer = await client.subscribe({
+        topic,
+        subscriptionType: "Shared",
+        subscription: 'sub1',
+        ackTimeoutMs: 10000,
+        nAckRedeliverTimeoutMs: 100,
+      });
+
+      expect(consumer).not.toBeNull();
+
+      const message = 'my-message';
+      producer.send({
+        data: Buffer.from(message),
+      });
+      await producer.flush();
+
+      let redeliveryCount;
+      let msg
+      for (let index = 0; index < 3; index++) {

Review comment:
       ```suggestion
         for (let index = 0; index < 3; index += 1) {
   ```




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