Skip to content

Commit 3c298ff

Browse files
anandgupta42claude
andcommitted
fix: remove flaky setTimeout in todo bus event test
`Bus.publish` is synchronous — the event is delivered immediately, no 50ms delay needed. Removes resource contention risk in parallel CI. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 8a4b557 commit 3c298ff

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

packages/opencode/test/session/todo.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ describe("Todo: CRUD lifecycle", () => {
118118
const todos = [{ content: "Emit test", status: "pending", priority: "high" }]
119119
Todo.update({ sessionID: session.id, todos })
120120

121-
await new Promise((resolve) => setTimeout(resolve, 50))
122-
121+
// Bus.publish is synchronous — event is delivered immediately
123122
unsub()
124123

125124
expect(eventReceived).toBe(true)

0 commit comments

Comments
 (0)