Skip to content

Skip test_multi_client on Windows#2714

Merged
jlowin merged 3 commits intomainfrom
fix-windows-multi-client-test-timeout
Dec 24, 2025
Merged

Skip test_multi_client on Windows#2714
jlowin merged 3 commits intomainfrom
fix-windows-multi-client-test-timeout

Conversation

@jlowin
Copy link
Copy Markdown
Member

@jlowin jlowin commented Dec 24, 2025

All tests in test_mcp_config.py spawn subprocess servers via stdio, which times out on Windows CI. This adds a file-level pytestmark to skip the entire file on Windows, and adds -v for better debugging of future failures.

@marvin-context-protocol marvin-context-protocol Bot added enhancement Improvement to existing functionality. For issues and smaller PR improvements. tests labels Dec 24, 2025
@marvin-context-protocol
Copy link
Copy Markdown
Contributor

marvin-context-protocol Bot commented Dec 24, 2025

Test Failure Analysis

Summary: The test test_multi_client_with_elicitation timed out (5s limit) on Windows during the test run.

Root Cause: The PR correctly adds a @pytest.mark.skipif decorator to test_multi_client (line 204), but there are four other tests in the same file that also spawn stdio subprocesses and will have the same timeout issues on Windows:

  • test_multi_client_with_logging (line 473)
  • test_multi_client_with_transforms (line 538)
  • test_multi_client_transform_with_filtering (line 644)
  • test_multi_client_with_elicitation (line 705) ← This one failed in CI

All four tests use the same pattern: they create temporary Python scripts, spawn them as stdio subprocesses using MCPConfigTransport, and make tool calls. This is the exact same pattern that causes timeouts on Windows, as documented in PR #2711.

Suggested Solution: Add the same @pytest.mark.skipif decorator to all four remaining tests:

@pytest.mark.skipif(
    sys.platform.startswith("win32"),
    reason="Windows has process lifecycle issues with stdio subprocesses",
)
Detailed Analysis

Log Excerpt

tests/test_mcp_config.py::test_multi_client_with_elicitation +++++++++++++++++++++++++++++++++++ Timeout +++++++++++++++++++++++++++++++++++
DEBUG    [Client-6a58] called call_tool: test_server_elicit_test
DEBUG    [FastMCP-MCPRouter-e0bb] Handler called: list_tools
DEBUG    Stdio transport connected

The test times out at the 5-second pytest timeout while attempting to make a tool call through the stdio transport.

Pattern Analysis

All five test_multi_client* tests follow this pattern:

  1. Create a temporary Python script with a FastMCP server
  2. Configure MCPConfigTransport with command="python" and the script path
  3. Create a Client and make tool calls

The only difference is what they test (logging, transforms, elicitation, etc.), but they all spawn stdio subprocesses which have known issues on Windows.

Related Files
  • tests/test_mcp_config.py:705 - test_multi_client_with_elicitation (failed test)
  • tests/test_mcp_config.py:473 - test_multi_client_with_logging
  • tests/test_mcp_config.py:538 - test_multi_client_with_transforms
  • tests/test_mcp_config.py:644 - test_multi_client_transform_with_filtering

@jlowin jlowin merged commit e821446 into main Dec 24, 2025
12 checks passed
@jlowin jlowin deleted the fix-windows-multi-client-test-timeout branch December 24, 2025 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improvement to existing functionality. For issues and smaller PR improvements. tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant