Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/opencode/test/mcp/lifecycle.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,7 @@ it.instance("disconnect removes protocol data and reconnect establishes a new se
yield* pollWithTimeout(
Effect.sync(() => (server.state.aborted > 0 ? server.state.aborted : undefined)),
"disconnected HTTP session was not aborted",
"10 seconds",
)

yield* Effect.promise(server.restart)
Expand All @@ -338,6 +339,7 @@ it.instance("add() closes the old protocol session when replacing a server", ()
yield* pollWithTimeout(
Effect.sync(() => (first.state.aborted > 0 ? first.state.aborted : undefined)),
"replaced HTTP session was not aborted",
"10 seconds",
)
expect(second.state.aborted).toBe(0)
expect(Object.keys(yield* mcp.tools())).toEqual(["replace-server_test_tool"])
Expand Down Expand Up @@ -543,6 +545,7 @@ it.instance("remote timeout aborts both real HTTP transport attempts", () =>
yield* pollWithTimeout(
Effect.sync(() => (server.aborted() >= 2 ? server.aborted() : undefined)),
"remote transport requests were not aborted",
"10 seconds",
)
expect(server.requests).toEqual(["POST", "GET"])
}),
Expand Down
Loading