Skip to content

fix(test): Refactor flaky StdioClientTransport tests to use real stdin pipes#508

Open
kpavlov wants to merge 1 commit intomainfrom
kpavlov/stdio-test
Open

fix(test): Refactor flaky StdioClientTransport tests to use real stdin pipes#508
kpavlov wants to merge 1 commit intomainfrom
kpavlov/stdio-test

Conversation

@kpavlov
Copy link
Contributor

@kpavlov kpavlov commented Feb 6, 2026

fix(test): Refactor flaky StdioClientTransport tests to use real stdin pipes

  • Replace mock-based stdin with real input/output pipes for better parity with actual usage.
  • Ensure proper cleanup of resources (stdin and stdout pipes).
  • Improve test stability by migrating from runTest to runBlocking for real-time I/O operations.

Motivation and Context

StdioClientTransportTest is flaky.

How Has This Been Tested?

Unit test

Breaking Changes

No

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

Checklist

  • I have read the MCP Documentation
  • 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

@kpavlov kpavlov added the tests label Feb 6, 2026
@kpavlov kpavlov marked this pull request as ready for review February 6, 2026 15:40
@kpavlov kpavlov requested review from e5l and skarpovdev and removed request for e5l February 6, 2026 16:41
…n pipes

- Replace mock-based stdin with real input/output pipes for better parity with actual usage.
- Ensure proper cleanup of resources (stdin and stdout pipes).
- Improve test stability by migrating from `runTest` to `runBlocking` for real-time I/O operations.
@kpavlov kpavlov force-pushed the kpavlov/stdio-test branch from f6d3b51 to 5d03db0 Compare February 7, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant