Skip to content

Commit

Permalink
test: fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed May 10, 2023
1 parent 7d8cb66 commit d6737ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ describe("@socket.io/redis-adapter", () => {
clientSockets[1].on("test", () => done());
clientSockets[2].on("test", shouldNotHappen(done));

servers[0].to("room1").emit("test");
// delay is needed for the sharded adapter in dynamic mode
setTimeout(() => servers[0].to("room1").emit("test"), 50);
});

it("broadcasts to all clients except in room", (done) => {
Expand Down

0 comments on commit d6737ef

Please sign in to comment.