Skip to content

chore: implement integration test for sampling #255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

LucaButBoring
Copy link
Contributor

Implements basic integration tests for sampling using the sampleLLM tool in @modelcontextprotocol/everything to avoid regressions.

Motivation and Context

Avoids regressions against the protocol.

How Has This Been Tested?

This PR only adds integration tests.

Breaking Changes

N/A

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

Additional context

@tzolov tzolov self-assigned this Jun 13, 2025
@tzolov tzolov added this to the 0.11.0 milestone Jun 13, 2025
@tzolov tzolov added the testing label Jun 13, 2025
tzolov added a commit that referenced this pull request Jun 15, 2025
- Add testSampling() methods to AbstractMcpAsyncClientTests and AbstractMcpSyncClientTests

Signed-off-by: Christian Tzolov <[email protected]>

Co-authored-by: Christian Tzolov <[email protected]>
@tzolov
Copy link
Contributor

tzolov commented Jun 15, 2025

Thank you @LucaButBoring ,
I've extended the PR to cover all transports: https://github.com/modelcontextprotocol/java-sdk/compare/gh-255-pr-2?expand=1
In the process discovered a regression with the WebClientStreamableHttpTransport. We will resolve the regression and then I will merge the gh-255-pr-2

tzolov added a commit that referenced this pull request Jun 16, 2025
- Add testSampling() methods to AbstractMcpAsyncClientTests and AbstractMcpSyncClientTests

Signed-off-by: Christian Tzolov <[email protected]>

Co-authored-by: Christian Tzolov <[email protected]>
@tzolov
Copy link
Contributor

tzolov commented Jun 16, 2025

The updated version was merged at f3b0774

@tzolov tzolov closed this Jun 16, 2025
@LucaButBoring LucaButBoring deleted the chore/integ-sampling branch June 16, 2025 20:24
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