Skip to content

Commit

Permalink
fix channel list number because of timed event in channel actor
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyukang committed Dec 5, 2024
1 parent 658123a commit a004421
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

0 comments on commit a004421

Please sign in to comment.