fix(integration-test): refactor integration test infrastructure, fix and enable tests with ts-client #478
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Refactor integration test infrastructure, fix and enable tests with ts-client
runTesttorunBlockingfor tests that spawn actual processes and communicate over real network connections.Key Changes
Extract
TypeScriptClientclass for managing TS client processesMove client scripts to integration-test/src/jvmTest/typescript/client/
Migrate typescript:
myClient.ts(2) →sse-client.ts,stdio-client.tsAutomate TypeScript dependency installation in static initializer
Enable JUnit parallel execution (dynamic strategy, concurrent mode) with test timeout of 2 minutes
Replace
mutableListOfwithConcurrentLinkedQueuefor thread-safe notification handlingMigrate integration tests from
runTesttorunBlockingRationale: Integration tests that spawn real TypeScript processes, establish actual
HTTP/SSE connections, and manage server lifecycles require real-time I/O behavior. The runTest framework's virtual time is designed for fast unit tests with simulated timing, not for integration scenarios where external processes and network communication must occur in real time. Parallel execution requires thread-safe data structures (ConcurrentLinkedQueue)
to safely collect notifications from multiple concurrent test instances.
Add
EmbeddedServer.actualPort()extension to get bound portStandardize kotlin.time.Duration usage across test utilities
Update processUtils.stopProcess() to accept Duration parameter
Replace RuntimeException checks with idiomatic check() calls
Revert
--rerun-tasksflag to Gradle workflows for reliable buildsMotivation and Context
Integration tests with typescript client are now broken. Enabling parallel test execution will force writing thread-safe independent tests and will highlight problems faster.
How Has This Been Tested?
CI
Breaking Changes
Types of changes
Checklist
Additional context
Follow up for #477