You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iggy.apache.org by hg...@apache.org on 2026/10/16 19:55:50 UTC

(iggy) 04/07: test(node): stop both consumers before deleting the e2e stream

This is an automated email from the ASF dual-hosted git repository.

hubcio pushed a commit to branch feat/sdk-partition-routing
in repository https://gitbox.apache.org/repos/asf/iggy.git

commit 208c3f05769261d557c0878561aacd4fe6eb364b
Author: Hubert Gruszecki <h....@gmail.com>
AuthorDate: Fri Oct 16 16:36:29 2026 +0200

    test(node): stop both consumers before deleting the e2e stream
    
    consumer-stream::poll-stream finished when the first consumer stream
    ended, and its after hook then deleted the stream. The second
    consumer stops only on its next data event, so it was sometimes
    still polling. Its next poll or group re-join after the delete got
    1009, and with no error listener on that stream the test failed.
    
    Destroy both consumer streams before the delete. A destroyed stream
    drops the error of a later poll.
---
 foreign/node/src/e2e/tcp.consumer-stream.e2e.ts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/foreign/node/src/e2e/tcp.consumer-stream.e2e.ts b/foreign/node/src/e2e/tcp.consumer-stream.e2e.ts
index b7026745e..32bf7ed5b 100644
--- a/foreign/node/src/e2e/tcp.consumer-stream.e2e.ts
+++ b/foreign/node/src/e2e/tcp.consumer-stream.e2e.ts
@@ -104,6 +104,10 @@ describe('e2e -> consumer-stream', async () => {
     });
 
     after(async () => {
+      // The member that did not get the last batch can still be polling,
+      // and a poll that fails after the delete has no error listener.
+      s.destroy();
+      s2.destroy();
       assert.ok(await c.stream.delete({ streamId: streamName }));
       assert.ok(await c.session.logout());
       await c.destroy();