Skip to content

Commit d6737ef

Browse files
test: fix flaky test
1 parent 7d8cb66 commit d6737ef

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ describe("@socket.io/redis-adapter", () => {
7575
clientSockets[1].on("test", () => done());
7676
clientSockets[2].on("test", shouldNotHappen(done));
7777

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

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

0 commit comments

Comments
 (0)