Skip to content

Fix Windows path handling in MCP external plugin tests#2634

Merged
crivetimihai merged 1 commit intoIBM:mainfrom
mintzo20:fix/flaky-tests-2521
Feb 1, 2026
Merged

Fix Windows path handling in MCP external plugin tests#2634
crivetimihai merged 1 commit intoIBM:mainfrom
mintzo20:fix/flaky-tests-2521

Conversation

@mintzo20
Copy link
Copy Markdown
Contributor

@mintzo20 mintzo20 commented Feb 1, 2026

🔗 Related Issue


📝 Summary

Fixes flaky/unit test failures on Windows by making path assertions OS-agnostic.
Specifically, it normalizes script path comparisons using pathlib.Path and makes
the missing-script error assertion robust across platforms.


🏷️ Type of Change

  • Bug fix
  • Feature / Enhancement
  • Documentation
  • Refactor
  • Chore (deps, CI, tooling)
  • Other (describe below)

🧪 Verification

Check Command Status
Unit tests (target) python -m pytest tests/unit/mcpgateway/plugins/framework/external/mcp/test_client_config.py -q ✅ Pass

✅ Checklist

  • Tests added/updated for changes
  • No secrets or credentials committed

📓 Notes (optional)

Test-only change; no production code affected.

@mintzo20
Copy link
Copy Markdown
Contributor Author

mintzo20 commented Feb 1, 2026

Hi maintainers 👋

This PR fixes flaky behavior in MCP external plugin tests on Windows by making path comparisons OS agnostic.
All relevant unit tests pass locally on Windows.

Thanks for your time and review!

@crivetimihai crivetimihai self-assigned this Feb 1, 2026
@crivetimihai
Copy link
Copy Markdown
Member

Hi @mintzo20, thanks for the contribution!

The code changes look good — using pathlib.Path for cross-platform path comparison is the right approach, and the regex update will correctly handle Windows backslashes in error messages. Nice catch on these Windows compatibility issues.

One thing to clarify: the PR references issue #2521, but that issue is about different flaky tests (TTL expiration timing in test_response_cache_by_prompt.py and test isolation in test_tool_service.py). The Windows path handling fix for test_client_config.py is unrelated to those.

Could you update the PR description to remove the "Closes #2521" reference?

Once that's updated, this is good to merge. Thanks again!

@crivetimihai crivetimihai added the awaiting-user Waiting for user feedback / retesting label Feb 1, 2026
@mintzo20
Copy link
Copy Markdown
Contributor Author

mintzo20 commented Feb 1, 2026

Thanks for pointing that out, you're right.

I've removed the reference to issue #2521 from the PR description, since this change is specifically about Windows path handling in test_client_config.py.

Appreciate the review!

@crivetimihai crivetimihai added this to the Release 1.0.0-RC1 milestone Feb 1, 2026
Signed-off-by: mintzo20 <adirmintz@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Copy link
Copy Markdown
Member

@crivetimihai crivetimihai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Rebased, tested, made some minor updates. Ready to merge!

@crivetimihai crivetimihai merged commit b9501f6 into IBM:main Feb 1, 2026
36 checks passed
hughhennelly pushed a commit to hughhennelly/mcp-context-forge that referenced this pull request Feb 8, 2026
Signed-off-by: mintzo20 <adirmintz@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: hughhennnelly <hughhennelly06@gmail.com>
kcostell06 pushed a commit to kcostell06/mcp-context-forge that referenced this pull request Feb 24, 2026
Signed-off-by: mintzo20 <adirmintz@gmail.com>
Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-user Waiting for user feedback / retesting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants