Skip to content

Commit 2cd7dd8

Browse files
committed
Simplify initClient function and clean imports in SseIntegrationTest.
1 parent 3f74b68 commit 2cd7dd8

File tree

1 file changed

+3
-4
lines changed
  • kotlin-sdk-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration

1 file changed

+3
-4
lines changed

kotlin-sdk-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/SseIntegrationTest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.modelcontextprotocol.kotlin.sdk.integration
22

33
import io.ktor.client.HttpClient
4-
import io.ktor.client.plugins.sse.SSE
54
import io.ktor.server.application.install
65
import io.ktor.server.cio.CIOApplicationEngine
76
import io.ktor.server.engine.EmbeddedServer
@@ -44,9 +43,9 @@ class SseIntegrationTest {
4443
}
4544
}
4645

47-
private suspend fun initClient(port: Int): Client {
48-
return HttpClient(ClientCIO) { install(ClientSSE) }.mcpSse("http://$URL:$port")
49-
}
46+
private suspend fun initClient(port: Int): Client = HttpClient(ClientCIO) {
47+
install(ClientSSE)
48+
}.mcpSse("http://$URL:$port")
5049

5150
private suspend fun initServer(): EmbeddedServer<CIOApplicationEngine, CIOApplicationEngine.Configuration> {
5251
val server = Server(

0 commit comments

Comments
 (0)