Skip to content

Conversation

@D-0771
Copy link

@D-0771 D-0771 commented Dec 2, 2025

(#636)

Added mock http client to test cases that depends on a GET request to raw.githubusercontent.com/modelcontextprotocol/java-sdk/refs/heads/main/README.md, which could fail if the request timed out.
The mock http client will read pom.xml (which is guaranteed to exist in user.dir) as a mock response.

Motivation and Context

For offline CI environments, the test cases could be modified to avoid dependency on connectivity to github server.

How Has This Been Tested?

This is a modification to test cases, the modified test cases have passed and also manually debugged to make sure that they went through the same code branch before changes.

Breaking Changes

No breaking changes to source code.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant