refactor: improve MCP client timeout handling and reactive testing#51
Merged
refactor: improve MCP client timeout handling and reactive testing#51
Conversation
- Add configurable initialization timeout separate from request timeout - Rename ServletSse* test classes to HttpSse* for better naming consistency - Replace direct .block() calls with StepVerifier for better reactive testing - Change ping() method to return Mono instead of Mono - Improve error handling and reactive programming patterns throughout tests - Chain reactive operations for cleaner test flow Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
chemicL
requested changes
Mar 19, 2025
Member
chemicL
left a comment
There was a problem hiding this comment.
Thanks, this will help a bit. Next step is to incorporate the VirtualTimeScheduler to avoid actually timing out after 1s but immediately doing so. I noticed some breaking changes, perhaps it's best to introduce them in a separate PR to highlight in the release notes easier?
|
|
||
| String errorMessage = "Test error"; | ||
| ((StdioClientTransport) mcpTransport).getErrorSink().tryEmitNext(errorMessage); | ||
| ((StdioClientTransport) mcpTransport).getErrorSink().emitNext(errorMessage, null); |
| */ | ||
| public Object ping() { | ||
| return this.delegate.ping().block(); | ||
| public void ping() { |
| * @return A Mono that completes when the server responds to the ping | ||
| */ | ||
| public Mono<Object> ping() { | ||
| public Mono<Void> ping() { |
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
Contributor
Author
|
Thanks for the suggestions @chemicL . Last commit addresses them all. |
Signed-off-by: Christian Tzolov <christian.tzolov@broadcom.com>
chemicL
approved these changes
Mar 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.