From ecfebd48a459a11c45a334039e9dd3c8ac5f1af8 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 27 Jul 2026 17:35:25 -0400 Subject: [PATCH] test(gateway): flush discussion title eviction without runAllTimers (#114751) --- src/gateway/server-methods/session-discussion.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gateway/server-methods/session-discussion.test.ts b/src/gateway/server-methods/session-discussion.test.ts index f967a94700da..a55bda2aaed6 100644 --- a/src/gateway/server-methods/session-discussion.test.ts +++ b/src/gateway/server-methods/session-discussion.test.ts @@ -253,7 +253,10 @@ describe("session discussion gateway methods", () => { expect(registered.open).toHaveBeenCalledOnce(); expect(mocks.emitSessionsChanged).not.toHaveBeenCalled(); releaseGeneration?.(null); - await vi.runAllTimersAsync(); + // Bounded flush: eviction settles via microtasks, so advancing 0ms is + // enough. runAllTimersAsync livelocks (10000-timer abort) when any other + // suite in a shared shard worker schedules an interval into this fake clock. + await vi.advanceTimersByTimeAsync(0); }); it("never generates a title for discussion info", async () => {