| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
This test shows that MCP server cleanup code in lifespan doesn't run when the process is terminated, but does run when stdin is closed first (as implemented in PR #1044). The test includes: - Demonstration of current broken behavior (cleanup doesn't run) - Verification that stdin closure allows graceful shutdown - Windows-specific ResourceWarning handling - Detailed documentation of the issue and solution Github-Issue:#1027
There was a problem hiding this comment.
Excellent, LGTM!
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Motivation and Context
Issue #1027 reports that MCP server cleanup code (after yield in lifespan) is unreachable when the process is terminated. This PR adds tests that:
How Has This Been Tested?
Added two tests in test_1027_win_unreachable_cleanup.py:
Tested on both macOS and Windows.
When run with PR #1091's changes, both tests pass.
Breaking Changes
None. Tests only.
Types of changes
Checklist
Additional context