## 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 -->
32 lines
913 B
Kotlin
32 lines
913 B
Kotlin
plugins {
|
|
id("mcp.multiplatform")
|
|
}
|
|
|
|
kotlin {
|
|
jvm {
|
|
testRuns["test"].executionTask.configure {
|
|
useJUnitPlatform()
|
|
}
|
|
}
|
|
sourceSets {
|
|
commonTest {
|
|
dependencies {
|
|
implementation(project(":kotlin-sdk"))
|
|
implementation(kotlin("test"))
|
|
implementation(libs.kotest.assertions.json)
|
|
implementation(libs.kotlin.logging)
|
|
implementation(libs.kotlinx.coroutines.test)
|
|
implementation(libs.ktor.client.cio)
|
|
implementation(libs.ktor.server.cio)
|
|
implementation(libs.ktor.server.test.host)
|
|
}
|
|
}
|
|
jvmTest {
|
|
dependencies {
|
|
implementation(kotlin("test-junit5"))
|
|
implementation(libs.awaitility)
|
|
runtimeOnly(libs.slf4j.simple)
|
|
}
|
|
}
|
|
}
|
|
}
|