Skip to content

Conversation

kpavlov
Copy link
Contributor

@kpavlov kpavlov commented Sep 11, 2025

Motivation and Context

To reduce test flackiness

How Has This Been Tested?

Integration tests

Changes

  • Use dynamic random ports for server setup
  • Add Awaitility for reliable server readiness checks and improved concurrency handling
  • Update test server start logic to return resolved port
  • Replace StringBuilder with StringBuffer
  • Remove redundant port discovery and wait logic

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
  • Refactoring

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

Additional context

@kpavlov kpavlov added the tests label Sep 11, 2025
@kpavlov kpavlov marked this pull request as ready for review September 11, 2025 17:55
@kpavlov kpavlov force-pushed the refactor-tests branch 2 times, most recently from 3aebe02 to f87a0c9 Compare September 12, 2025 03:25
@skarpovdev
Copy link
Contributor

skarpovdev commented Sep 12, 2025

@kpavlov @devcrocod Let's try .atMost(30.seconds.toJavaDuration()) on await (line 145 in TypeScriptClientKotlinServerTest)?
It seems to be defaulting to 10s atm.

- Use dynamic random ports for server setup
- Add `Awaitility` for reliable server readiness checks and improved concurrency handling
- Update test server start logic to return resolved port
- Replace `StringBuilder` with `StringBuffer`
- Remove redundant port discovery and wait logic
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.

2 participants