-
Notifications
You must be signed in to change notification settings - Fork 177
Add test with new schema types #389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
b05232b to
8e689e7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep those tests till 0.9, when old models will be removed entirely:
- OldSchemaPromptIntegrationTestSse.kt
- OldSchemaResourceIntegrationTestSse.kt
- OldSchemaToolIntegrationTestSse.kt
- OldSchemaPromptIntegrationTestStdio.kt
- OldSchemaResourceIntegrationTestStdio.kt
- OldSchemaToolIntegrationTestStdio.kt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request adds comprehensive test coverage with new schema types while maintaining backwards compatibility through old schema tests. The changes focus on duplicating existing tests to support both the new and old schema implementations during a transition period.
Key Changes:
- Addition of new schema tests for server features (tools, resources, prompts, instructions)
- Renaming of existing tests to "OldSchema" variants for backwards compatibility
- Update of import statements from
io.modelcontextprotocol.kotlin.sdk.*toio.modelcontextprotocol.kotlin.sdk.types.* - Creation of abstract base test classes for better code organization
Reviewed Changes
Copilot reviewed 64 out of 64 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ServerToolsTest.kt | New tests for tool management with new schema types |
| ServerResourcesTest.kt | New tests for resource management with new schema types |
| ServerPromptsTest.kt | New tests for prompt management with new schema types |
| ServerInstructionsTest.kt | Updated imports to use new schema types |
| OldSchemaServerInstructionsTest.kt | Backwards compatibility tests using old schema |
| AbstractServerFeaturesTest.kt | Base class for server feature tests |
| KotlinClientTsServerTestStdio.kt | New integration tests with TypeScript server via stdio |
| KotlinClientTsServerEdgeCasesTestStdio.kt | Edge case tests for stdio transport |
| OldSchemaKotlinClientTsServerTestStdio.kt | Old schema tests for stdio transport |
| OldSchemaKotlinClientTsServerEdgeCasesTestStdio.kt | Old schema edge case tests |
| KotlinServerForTsClientSse.kt | New SSE server implementation for TypeScript client tests |
| OldSchemaKotlinServerForTsClientSse.kt | Old schema SSE server implementation |
| KotlinClientTsServerTestSse.kt | New SSE transport tests |
| OldSchemaKotlinClientTsServerTestSse.kt | Old schema SSE transport tests |
| TsTestBase.kt | Updated base class with new schema imports |
| OldSchemaTsTestBase.kt | Base class for old schema TypeScript tests |
| AbstractKotlinClientTsServerTest.kt | Abstract test class for Kotlin-TypeScript integration |
| OldSchemaAbstractKotlinClientTsServerTest.kt | Old schema abstract test class |
| SseIntegrationTest.kt | New SSE integration tests |
| AbstractSseIntegrationTest.kt | Base class for SSE integration tests |
| WebSocketIntegrationTest.kt | WebSocket integration tests |
| ToolIntegrationTestStdio.kt | Tool integration tests via stdio |
| ResourceIntegrationTestStdio.kt | Resource integration tests via stdio |
| PromptIntegrationTestStdio.kt | Prompt integration tests via stdio |
| KotlinTestBase.kt | Base class for Kotlin integration tests |
| AbstractToolIntegrationTest.kt | Abstract base for tool integration tests |
| AbstractResourceIntegrationTest.kt | Abstract base for resource integration tests |
| AbstractPromptIntegrationTest.kt | Abstract base for prompt integration tests |
| InMemoryTransport.kt | Updated imports to new schema types |
| OldSchemaInMemoryTransport.kt | Old schema in-memory transport implementation |
| BaseTransportTest.kt | Updated imports to new schema types |
| OldSchemaBaseTransportTest.kt | Old schema transport tests |
| InMemoryTransportTest.kt | Updated imports to new schema types |
| OldSchemaInMemoryTransportTest.kt | Old schema in-memory transport tests |
| SseTransportTest.kt | Updated imports to new schema types |
| OldSchemaSseTransportTest.kt | Old schema SSE transport tests |
| ClientTest.kt | Comprehensive client tests with new schema |
| StdioServerTransportTest.kt | Updated imports to new schema types |
| OldSchemaStdioServerTransportTest.kt | Old schema stdio server transport tests |
| ReadBufferTest.kt | Updated imports to new schema types |
| OldSchemaReadBufferTest.kt | Old schema read buffer tests |
| ProgressNotificationsTest.kt | Tests for progress notifications |
| OldSchemaAudioContentSerializationTest.kt | Renamed old schema audio content tests |
| StreamableHttpClientTest.kt | New streamable HTTP client tests |
| MockMcp.kt | New mock MCP server implementation |
| OldSchemaMockMcp.kt | Old schema mock MCP server |
| AbstractStreamableHttpClientTest.kt | Updated to use old schema mock |
| StreamableHttpClientTransportTest.kt | Updated imports to new schema types |
| OldSchemaStreamableHttpClientTransportTest.kt | Old schema streamable HTTP transport tests |
| MockTransport.kt | Updated imports to new schema types |
| OldSchemaMockTransport.kt | Old schema mock transport |
| ClientMetaParameterTest.kt | Updated imports to new schema types |
| OldSchemaClientMetaParameterTest.kt | Old schema client meta parameter tests |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
These tests were renamed after refactoring in last pr. package io.modelcontextprotocol.kotlin.sdk.integration.kotlin.sse
import io.modelcontextprotocol.kotlin.sdk.integration.kotlin.AbstractToolIntegrationTest
class ToolIntegrationTestSse : AbstractToolIntegrationTest() {
override val transportKind: TransportKind = TransportKind.SSE
} |
|
Let it go after #376, since 376 catches a regression |
8e689e7 to
a8ac111
Compare
Add tests with new schema types
Motivation and Context
How Has This Been Tested?
The repository currently contains duplicated tests:
Breaking Changes
No
Types of changes
Checklist