Commit c3aac59
Replace pytest-retry with pytest-rerunfailures for Windows stability
Windows CI was experiencing worker crashes due to ConnectionResetError in
pytest-retry's internal server when running with pytest-xdist:
```
pytest_retry\server.py", line 45, in run_server
chunk = conn.recv(4096)
ConnectionResetError: [WinError 10054] An existing connection was forcibly
closed by the remote host
```
This crashed worker gw0, leaving orphaned temp directories with locked
SQLite files, causing cascading teardown failures in caching tests.
Even pytest-retry 1.7.0 (latest, with socket cleanup fixes) has unresolved
race conditions in its server/client communication on Windows with xdist.
**Solution**: Switch to pytest-rerunfailures, which has better pytest-xdist
compatibility and is the officially recommended plugin by pytest-dev.
**Changes**:
- Replace `pytest-retry>=1.7.0` with `pytest-rerunfailures>=14.0`
- Update flaky test markers:
- `@pytest.mark.flaky(retries=N)` → `@pytest.mark.flaky(reruns=N)`
- `delay=N` → `reruns_delay=N`
- Updated 3 flaky tests:
- `test_github_mcp_remote.py::TestGithubMCPRemote` (network tests)
- `test_mcp_config.py::test_multi_client_transform_with_filtering` (subprocess timing)
- `test_openapi_experimental.py::test_client_headers_proxy` (proxy test)
pytest-rerunfailures is actively maintained by pytest-dev and explicitly
documents compatibility with pytest-xdist, including support for rerunning
tests when workers crash.
Related: https://github.com/jlowin/fastmcp/actions/runs/19540316503/job/55944598449
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 65143fa commit c3aac59
5 files changed
Lines changed: 11 additions & 10 deletions
File tree
- tests
- client
- integration_tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
642 | | - | |
| 642 | + | |
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments