equanz commented on PR #229:
URL: 
https://github.com/apache/pulsar-client-node/pull/229#issuecomment-1236727617

   It seems https://github.com/apache/pulsar/pull/15009 causes the following 
errors. This change was released as `v2.9.3` and `v2.10.1` .
   I modified test codes to address this change.
   
   ```
   > jest --verbose
   
   Browserslist: caniuse-lite is outdated. Please run:
     npx browserslist@latest --update-db
     Why you should do it regularly: 
https://github.com/browserslist/browserslist#browsers-data-updating
   PASS tests/end_to_end.test.js (9.466 s)
     End To End
       ✓ Produce/Consume (582 ms)
       ✓ negativeAcknowledge (2381 ms)
       ✓ getRedeliveryCount (310 ms)
       ✓ Produce/Consume Listener (103 ms)
       ✓ Produce/Read Listener (98 ms)
       ✓ acknowledgeCumulative (1091 ms)
       ✓ subscriptionInitialPosition (125 ms)
       ✓ Produce/Read (92 ms)
       ✓ Produce-Delayed/Consume (3100 ms)
       ✓ Produce/Consume/Unsubscribe (141 ms)
       ✓ Produce/Read (Compression) (66 ms)
       ✓ Produce/Consume-Pattern (134 ms)
       ✓ Produce/Consume-Multi-Topic (140 ms)
       ✓ Produce/Consume and validate MessageId (224 ms)
       ✓ Basic produce and consume encryption (115 ms)
       ✓ Produce/Consume/Read/IsConnected (17 ms)
   
   FAIL tests/consumer.test.js
     Consumer
       Create
         ✓ No Topic (1 ms)
         ✓ Not String Topic (1 ms)
         ✓ Not String TopicsPattern
         ✓ Not Array Topics
         ✓ Not String in Array Topics (1 ms)
         ✓ No Subscription
         ✓ Not String Subscription (1 ms)
         ✕ Not Exist Tenant (18 ms)
         ✕ Not Exist Namespace (4 ms)
         ✓ Not Positive NAckRedeliverTimeout (1 ms)
       Close
         ✓ throws error on subsequent calls to close (55 ms)
   
     ● Consumer › Create › Not Exist Tenant
   
       expect(received).rejects.toThrow(expected)
   
       Expected substring: "Failed to create consumer: ConnectError"
       Received message:   "Failed to create consumer: BrokerMetadataError"
   
         103 |           ackTimeoutMs: 10000,
         104 |           nAckRedeliverTimeoutMs: 60000,
       > 105 |         })).rejects.toThrow('Failed to create consumer: 
ConnectError');
             |                     ^
         106 |       });
         107 |
         108 |       test('Not Exist Namespace', async () => {
   
         at Object.toThrow (node_modules/expect/build/index.js:285:22)
         at Object.<anonymous> (tests/consumer.test.js:105:21)
   
     ● Consumer › Create › Not Exist Namespace
   
       expect(received).rejects.toThrow(expected)
   
       Expected substring: "Failed to create consumer: ConnectError"
       Received message:   "Failed to create consumer: BrokerMetadataError"
   
         112 |           ackTimeoutMs: 10000,
         113 |           nAckRedeliverTimeoutMs: 60000,
       > 114 |         })).rejects.toThrow('Failed to create consumer: 
ConnectError');
             |                     ^
         115 |       });
         116 |
         117 |       test('Not Positive NAckRedeliverTimeout', async () => {
   
         at Object.toThrow (node_modules/expect/build/index.js:285:22)
         at Object.<anonymous> (tests/consumer.test.js:114:21)
   
   FAIL tests/producer.test.js
     Producer
       Create
         ✓ No Topic (1 ms)
         ✓ Not String Topic (1 ms)
         ✕ Not Exist Tenant (3 ms)
         ✕ Not Exist Namespace (2 ms)
         ✓ Automatic Producer Name (42 ms)
         ✓ Explicit Producer Name (6 ms)
         ✓ Topic Name (6 ms)
   
     ● Producer › Create › Not Exist Tenant
   
       expect(received).rejects.toThrow(expected)
   
       Expected substring: "Failed to create producer: ConnectError"
       Received message:   "Failed to create producer: BrokerMetadataError"
   
         56 |           sendTimeoutMs: 30000,
         57 |           batchingEnabled: true,
       > 58 |         })).rejects.toThrow('Failed to create producer: 
ConnectError');
            |                     ^
         59 |       });
         60 |
         61 |       test('Not Exist Namespace', async () => {
   
         at Object.toThrow (node_modules/expect/build/index.js:285:22)
         at Object.<anonymous> (tests/producer.test.js:58:21)
   
     ● Producer › Create › Not Exist Namespace
   
       expect(received).rejects.toThrow(expected)
   
       Expected substring: "Failed to create producer: ConnectError"
       Received message:   "Failed to create producer: BrokerMetadataError"
   
         64 |           sendTimeoutMs: 30000,
         65 |           batchingEnabled: true,
       > 66 |         })).rejects.toThrow('Failed to create producer: 
ConnectError');
            |                     ^
         67 |       });
         68 |
         69 |       test('Automatic Producer Name', async () => {
   
         at Object.toThrow (node_modules/expect/build/index.js:285:22)
         at Object.<anonymous> (tests/producer.test.js:66:21)
   
   PASS tests/reader.test.js
     Reader
       ✓ No Topic (1 ms)
       ✓ Not String Topic (1 ms)
       ✓ No StartMessageId (1 ms)
       ✓ Not StartMessageId as MessageId
   
   Test Suites: 2 failed, 2 passed, 4 total
   Tests:       4 failed, 34 passed, 38 total
   Snapshots:   0 total
   Time:        9.915 s
   Ran all test suites.
   ```


-- 
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: dev-unsubscr...@pulsar.apache.org

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

Reply via email to