From a00442188d1a1d2e8af2b928c231e2545dd1ca8c Mon Sep 17 00:00:00 2001 From: yukang Date: Thu, 5 Dec 2024 12:50:28 +0800 Subject: [PATCH] fix channel list number because of timed event in channel actor --- .../bruno/e2e/udt/14-node2-list-channel-expect-two-channel.bru | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/bruno/e2e/udt/14-node2-list-channel-expect-two-channel.bru b/tests/bruno/e2e/udt/14-node2-list-channel-expect-two-channel.bru index b84a84e8..343d82f1 100644 --- a/tests/bruno/e2e/udt/14-node2-list-channel-expect-two-channel.bru +++ b/tests/bruno/e2e/udt/14-node2-list-channel-expect-two-channel.bru @@ -37,7 +37,8 @@ script:post-response { // Sleep for sometime to make sure current operation finishes before next request starts. await new Promise(r => setTimeout(r, 2000)); console.log("accept channel result: ", res.body.result.channels); - if (res.body.result.channels.length != 2) { + const readyChannels = res.body.result.channels.filter(channel => channel.state.state_name === "CHANNEL_READY"); + if (readyChannels.length != 2) { throw new Error("Assertion failed: expect there are 2 channels"); } }