Commit graph kotlin-sdk/kotlin-sdk-test
Author SHA1 Message Date
Sergey Karpov
8ead8d3d4d
Add Stdio coverage for integration tests (#276)
This PR adds integration test coverage by covering the Stdio transport.
The tests were refactored to accommodate Stdio without adding
duplication.

## Types of changes

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [x] Test improvement

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [x] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [x] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed

## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->

---------

Co-authored-by: Pavel Gorgulov <devcrocod@gmail.com>
2025-09-16 23:23:51 +03:00
Pavel Gorgulov
ba631229aa
Mark testMultipleClientParallel as ignored due to flakiness (#267)
Ignore flaky `testMultipleClientParallel`
2025-09-15 18:56:32 +02:00
Konstantin Pavlov
7bdd6b93f6
Refactor integration tests (#256)
## Motivation and Context

Flaky integration tests

## How Has This Been Tested?

`./gradlew check`

## Changes

- Use random port for Ktor in tests
- Remove unused `TestUtils` utility class.
- Replace `runTest` with `runBlocking` in test cases.
- Adjust imports and formatting for consistency.
- Add `Awaitility` dependency for dynamic server setup.
- Update `Duration` usage from milliseconds to seconds.
- Minor configuration and code formatting updates.

## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [x] Test update

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [ ] My code follows the repository's style guidelines
- [ ] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed

## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->
2025-09-11 19:38:09 +03:00
木葉 Scarlet
b1ba0cd371
Remove dependency on CIO engine (#223)
<!-- Provide a brief summary of your changes -->
Replace the CIO dependency with only server/client core dependency.

## Motivation and Context
<!-- Why is this change needed? What problem does it solve? -->
In order to minimize the size of package. There are probably other
existing engines like Netty/Tomcat(server) or Java/OkHttp/Apache(client)
in the classpath. So we can reuse existing infrastructure.

## How Has This Been Tested?
<!-- Have you tested this in a real application? Which scenarios were
tested? -->
I have run:
- kotlin-sdk-client: jvmTest, jsTest
- kotlin-sdk-test: jvmTest, jsTest
- kotlin-sdk-server: allTests
- All `build` of samples

I have an issue about `samples/kotlin-mcp-server`.
`io.modelcontextprotocol` is not found in `commonMain`.

## Breaking Changes
<!-- Will users need to update their code or configurations? -->
Yes. They need to `implementation` CIO engine manually if they use it in
their app.

## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation update

## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply. -->
- [ ] I have read the [MCP
Documentation](https://modelcontextprotocol.io)
- [ ] My code follows the repository's style guidelines
- [x] New and existing tests pass locally
- [ ] I have added appropriate error handling
- [ ] I have added or updated documentation as needed

## Additional context
<!-- Add any other context, implementation notes, or design decisions
-->

closes https://github.com/modelcontextprotocol/kotlin-sdk/issues/111

---------

Co-authored-by: Konstantin Pavlov <1517853+kpavlov@users.noreply.github.com>
2025-09-11 14:30:36 +03:00
Sergey Karpov
c455974e86
Introduce Kotlin client/server <--> TypeScript client/server integration tests (#216)
* Introduce Kotlin<->TypeScript integration tests

Signed-off-by: Sergey Karpov <sergey.karpov@jetbrains.com>

* Add notifications test

Signed-off-by: Sergey Karpov <sergey.karpov@jetbrains.com>

* fixup! Introduce Kotlin integration tests

Signed-off-by: Sergey Karpov <sergey.karpov@jetbrains.com>

* fixup! Introduce Kotlin integration tests

Signed-off-by: Sergey Karpov <sergey.karpov@jetbrains.com>

* fixup! Introduce Kotlin integration tests

Signed-off-by: Sergey Karpov <sergey.karpov@jetbrains.com>

* cleanup

Signed-off-by: Sergey Karpov <sergey.karpov@jetbrains.com>

* Fix tests on Windows

* fixup! Fix tests on Windows

Signed-off-by: Sergey Karpov <sergey.karpov@jetbrains.com>

* fixup! Fix tests on Windows

* fixup! Fix tests on Windows

Signed-off-by: Sergey Karpov <sergey.karpov@jetbrains.com>

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

* fixup! Introduce Kotlin integration tests

---------

Signed-off-by: Sergey Karpov <sergey.karpov@jetbrains.com>
2025-09-09 18:04:35 +02:00
Sergey Karpov
a23856e68e
Add recovery during deserialization and upload test artifacts (#243)
* Add recovery during message deserialization, update workflow, use JUnit Platform for JVM tests
2025-08-29 12:35:01 +02:00
Maria Tigina
9bb851aba2
Fix deserialization in read buffer (#225)
* Add deserialization error processing

* Add test
2025-08-19 19:00:35 +02:00
Pavel Gorgulov
91cf1205af
Add ktlint (#213)
* Add ktlint

* Simplify `initClient` function and clean imports in SseIntegrationTest.
2025-08-05 13:10:44 +00:00
Pavel Gorgulov
75d63c8cb2
Refactor SseIntegrationTest to use dynamic port assignment and simplify client/server initialization. (#212) 2025-08-04 18:41:33 +02:00
Pavel Gorgulov
8698b96dd2
modularize sdk (#208)
* Modularize SDK: migrated client and server implementations to separate modules. Removed old configuration files and reorganized the source code structure

* add support native targets and update js/wasm configurations

* Refactor sample projects: add samples as composite builds, replace hardcoded dependencies with version catalog, remove obsolete gradle wrapper files

* Update .gitignore: exclude SWE agent directories (.claude/ and .junie/)

* Refine CodeQL workflow: update Kotlin build steps to target individual modules separately instead of building all at once
2025-08-04 11:53:38 +02:00