From 30aa2803e476002bb2d0b03d5259daf8f5a201ad Mon Sep 17 00:00:00 2001 From: Raffael Campos Date: Wed, 23 Oct 2024 14:31:31 -0300 Subject: [PATCH] Simplify stream cleanup in composedStream test Replaced Promise.allSettled with a for-loop for stream destruction in the composedStream integration test. This change ensures that each stream is destroyed sequentially. --- tests/integration/composedStream.test.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/integration/composedStream.test.ts b/tests/integration/composedStream.test.ts index dfe83b2..52b7b9e 100644 --- a/tests/integration/composedStream.test.ts +++ b/tests/integration/composedStream.test.ts @@ -134,11 +134,9 @@ describe.sequential( expect(firstRecord!.dateValue).toBe("2020-01-01"); } finally { // Cleanup: destroy all streams - await Promise.allSettled( - allStreamIds.map((streamId) => - defaultClient.destroyStream(streamId, true).catch(() => {}), - ), - ); + for (const streamId of allStreamIds) { + await defaultClient.destroyStream(streamId, true).catch(() => {}); + } } }, );