test: remove mokksy dependency#754
Open
devcrocod wants to merge 1 commit into
Open
Conversation
…t, consolidating with integration tests.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the dev.mokksy:mokksy test dependency and replaces the affected Streamable HTTP client tests with a combination of MockEngine-based common tests and embedded-server integration tests, reducing supply-chain exposure while preserving coverage for key behaviors.
Changes:
- Removed Mokksy-based JVM tests and their supporting mock server utilities.
- Added a
commonTestcoverage replacement for “skip empty SSE” usingMockEngineand inline SSE parsing. - Added new JVM integration tests for Streamable HTTP client transport using
embeddedServer+ CIO.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| kotlin-sdk-client/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StreamableHttpClientTest.kt | Removed Mokksy-based Streamable HTTP client tests. |
| kotlin-sdk-client/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/MockMcp.kt | Removed Mokksy-based mock MCP server implementation. |
| kotlin-sdk-client/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/AbstractStreamableHttpClientTest.kt | Removed Mokksy-backed shared test harness. |
| kotlin-sdk-client/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/client/streamable/http/StreamableHttpClientTransportTest.kt | Added MockEngine-based test to ensure empty/whitespace SSE events are skipped. |
| kotlin-sdk-client/build.gradle.kts | Dropped the Mokksy dependency from JVM tests. |
| integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/streamablehttp/StreamableHttpClientTransportIntegrationTest.kt | Added embedded-server integration tests for GET SSE notifications, termination, and non-SSE GET behaviors. |
| gradle/libs.versions.toml | Removed the Mokksy version and library entry from the catalog. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| awaitCancellation() | ||
| } | ||
| } | ||
| delete(MCP_PATH) { |
| internal class StreamableHttpClientTransportIntegrationTest { | ||
|
|
||
| @Test | ||
| fun `client receives progress notifications via GET SSE and lists tools`(): Unit = runBlocking(Dispatchers.IO) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Drops
dev.mokksy:mokksydependencyMotivation and Context
mokksyis a niche, single-maintainer library with very limited external adoption, introduced by its own author. Keeping a test-only dependency on it is unnecessary supply-chain exposure given that the two patterns already used in this repo,MockEnginefor transport-level tests andembeddedServerfor integration-level tests, cover everything it provided.Breaking Changes
none
Types of changes
Checklist