Repository navigation
Restore green MCP SDK 2.x test suite - #532
Merged
Merged
Conversation
Align MSBuild runtime dependencies, correct SDK-sensitive fixtures, and isolate tool command tests from real installations. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…way-fix-tests-for-sdk-2-0
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues are identified for the fixture repairs and tool-command test isolation changes.
No open issues 🎉
What changed in this PR
This PR addresses #488 by repairing test fixtures and isolating tool-command tests while retaining MCP SDK 2.3.0 and the existing native and legacy protocol contracts.
Changes:
- Align MSBuild runtime dependencies and correct project-analysis fixtures for SDK-evaluated properties.
- Record tool commands through a per-instance executor override, with stronger argument assertions and local/global interception coverage.
- Serialize workspace snapshot tests and document test isolation and runtime requirements.
| File | Description |
|---|---|
DotNetMcp/Tools/Cli/DotNetCliTools.Core.cs |
Adds an internal executor override shared by normal and concurrency-controlled execution. |
DotNetMcp/DotNetMcp.csproj |
Aligns MSBuild packages and explicitly references NuGet.Frameworks. |
DotNetMcp.Tests/Tools/EdgeCaseAndIntegrationTests.cs |
Enables tool-command recording to avoid real tool changes. |
DotNetMcp.Tests/Tools/DotNetCliToolsTests.cs |
Records tool commands and strengthens argument assertions. |
DotNetMcp.Tests/Tools/DotNetCliToolsConsolidatedToolTests.cs |
Adds local/global interception coverage and command assertions. |
DotNetMcp.Tests/SdkIntegration/ProjectAnalysisHelperTests.cs |
Corrects unset-property fixtures and separates evaluation-error coverage from validation. |
DotNetMcp.Tests/Resources/WorkspaceSnapshotResourceTests.cs |
Uses the nonparallel process-wide-state collection. |
DotNetMcp.Tests/Infrastructure/MachineReadableCommandAssertions.cs |
Adds a recorder for tool commands while preserving execution of other commands. |
doc/testing.md |
Documents compatibility, isolation, and runtime dependency requirements. |
Review effort: Balanced
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.
Why
The MCP 2.x migration is already present, but the full suite still had 35 failures and tool command tests could modify the checked-in tool manifest or the user's global installations. This restores a green suite while retaining the existing MCP SDK 2.3.0 packages and native/legacy protocol contracts.
Approach
Verification
Fixes: #488