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 -->
This commit is contained in:
parent
be22708b67
commit
7bdd6b93f6
1 changed files with 174 additions and 195 deletions
|
|
@ -36,11 +36,10 @@ import kotlinx.serialization.json.JsonObject
|
|||
import kotlinx.serialization.json.JsonPrimitive
|
||||
import kotlinx.serialization.json.encodeToJsonElement
|
||||
import kotlinx.serialization.serializer
|
||||
import kotlin.collections.get
|
||||
import kotlin.reflect.KType
|
||||
import kotlin.reflect.typeOf
|
||||
import kotlin.time.Duration
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
|
||||
private val LOGGER = KotlinLogging.logger { }
|
||||
|
||||
|
|
@ -85,7 +84,7 @@ public open class ProtocolOptions(
|
|||
/**
|
||||
* The default request timeout.
|
||||
*/
|
||||
public val DEFAULT_REQUEST_TIMEOUT: Duration = 60000.milliseconds
|
||||
public val DEFAULT_REQUEST_TIMEOUT: Duration = 60.seconds
|
||||
|
||||
/**
|
||||
* Options that can be given per request.
|
||||
|
|
|
|||
Loading…
Reference in a new issue