Skip to content

Flaky Windows CI: tests/cli/test_run.py stdio timeouts #3961

@jlowin

Description

@jlowin

tests/cli/test_run.py intermittently times out on Windows (Python 3.10, windows-latest), causing CI failures unrelated to the PR under test. The test appears to hang inside asyncio's selector loop while running a stdio transport test, eventually triggering pytest-timeout's thread-level timeout.

Example run: https://github.com/PrefectHQ/fastmcp/actions/runs/24585375099/job/71893509389

Observed on #3960, but the failure has no connection to that PR's changes and we've seen similar stdio timeouts on Windows across other PRs.

Worth investigating the stdio transport tests specifically — likely candidates:

  • Process spawn/teardown timing that's racier on Windows
  • keep_alive=True not cleaning up cleanly under pytest-xdist
  • Selector-based event loop quirks on Windows 3.10

Separating this from any one PR's diff so it doesn't keep blocking unrelated merges.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. Reports of errors, unexpected behavior, or broken functionality.cliRelated to FastMCP CLI commands (run, dev, install) or CLI functionality.tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions