Skip to content

Commit 11394a4

Browse files
cliffhallclaude
andcommitted
test(filesystem): assert waiting calls are released before the initial answer arrives
The failed-overtaking-refresh test released the held initial roots/list before asserting, so it would also pass if callers stayed blocked on it. Assert first, then release for cleanup (Copilot on #5098). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: cliffhall <[email protected]>
1 parent 564e84d commit 11394a4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎src/filesystem/__tests__/server-roots.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -490,8 +490,10 @@ describe("roots/list_changed", () => {
490490
),
491491
);
492492

493-
releaseInitial();
493+
// Asked while the initial roots/list is still unanswered: the failed update
494+
// releases waiting calls instead of leaving them blocked on it.
494495
expect(await allowedDirectoriesOf(client)).toEqual([cliDir]);
496+
releaseInitial();
495497
});
496498

497499
it("logs and keeps the current directories when the re-fetch fails", async () => {

0 commit comments

Comments
 (0)