Skip to content
Open
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
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ collections-immutable = "0.5.2"
coroutines = "1.11.0"
kotest = "6.2.5"
kotlinx-io = "0.9.1"
ktor = "3.5.2"
ktor = "3.6.0"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking: Ktor 3.6.0 breaks SSE streaming under testApplication.

Problem — In 3.6.0 the test host no longer hands the response to the client until the response body completes. An MCP SSE stream never completes by design, so prepareGet(...).execute { } against an SSE endpoint blocks forever instead of entering the lambda. The regression is confined to ktor-server-test-host; real engines are unaffected, so this is a test-harness break rather than an SDK defect.

Failure scenario — 8 of 228 :kotlin-sdk-server:jvmTest tests hang for 60s and fail with UncompletedCoroutinesError: KtorRouteExtensionsTest (×3), StreamableHttpServerTransportTest (×3), KtorApplicationExtensionsTest, SseServerTransportTest. That is exactly what Build (Linux Tests) is currently red on. Reproduced locally with the version as the only variable: the same 8 fail on 3.6.0, all 228 pass on 3.5.2. Reduced further — a testApplication that installs SSE + mcp() and calls client.prepareGet("/").execute { } never enters the lambda on 3.6.0 (60s timeout), while on 3.5.2 it reads the endpoint event and finishes in ~3s.

Suggested fix — Hold at 3.5.2 and report upstream; the likely culprit is KTOR-8705 / ktorio/ktor#5868, which changed the channel writer's coroutine context in TestApplicationResponse. Let Dependabot retry once a 3.6.x carries the fix. Taking 3.6.0 now would instead require porting the SSE tests off testApplication onto a real embeddedServer(CIO) on an ephemeral port — a change too large to ride along in a dependency bump.

logging = "8.0.4"
mockk = "1.14.11"
serialization = "1.11.0"
Expand Down
Loading