You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -77,6 +77,7 @@ Follow these rules to keep changes safe, comprehensible, and easy to maintain.
77
77
-**Prioritize test readability**
78
78
- Avoid creating too many test methods; use parametrized tests when testing multiple similar scenarios
79
79
- When running tests on Kotlin Multiplatform projects, run JVM tests only unless asked for other platforms
80
+
-**Concurrency in Tests**: Always use thread-safe collections (e.g., `Mutex`-protected lists or `Channel`) when collecting messages from transports that process messages concurrently in the background (like those inheriting from `AbstractTransport`). Using non-thread-safe `MutableList` will lead to flaky tests or missing messages.
80
81
81
82
### Test Framework Stack
82
83
@@ -169,6 +170,7 @@ prop.shouldNotBeNull {
169
170
- Use Kotlinx Serialization with explicit `@Serializable` annotations
170
171
- JSON config is defined in `jsonUtils.kt` as `McpJson` — use it consistently
171
172
- Register custom serializers in companion objects
173
+
-**SSE Data Concatenation**: When parsing Server-Sent Events (SSE) data, always ensure that multiple `data:` lines are concatenated with a newline (`\n`) separator, as per the SSE specification.
Copy file name to clipboardExpand all lines: integration-test/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/InMemoryTransportTest.kt
Copy file name to clipboardExpand all lines: integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/AbstractAuthenticationTest.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -113,7 +113,7 @@ abstract class AbstractAuthenticationTest {
113
113
var mcpClient:Client?=null
114
114
try {
115
115
mcpClient =Client(Implementation(name ="test-client", version ="1.0.0"))
Copy file name to clipboardExpand all lines: integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/AbstractToolIntegrationTest.kt
Copy file name to clipboardExpand all lines: integration-test/src/jvmTest/kotlin/io/modelcontextprotocol/kotlin/sdk/integration/kotlin/KotlinTestBase.kt
0 commit comments