Skip to content

test: add stress test for client disconnect handling - #83

Merged
bolinocroustibat merged 2 commits into
mainfrom
test/stress-test-client-disconnect
Mar 27, 2026
Merged

test: add stress test for client disconnect handling#83
bolinocroustibat merged 2 commits into
mainfrom
test/stress-test-client-disconnect

Conversation

@bolinocroustibat

@bolinocroustibat bolinocroustibat commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Adds a pytest stress test that sends 100 concurrent requests (50 normal + 50 with immediate TCP disconnect). Includes verification that the server handles abrupt client disconnects without crashing and that normal requests still succeed, mainly to reproduce and test #84.

New test is tests/test_stress.py with @pytest.mark.stress marker, and it is excluded from default pytest runs (addopts = "-m 'not stress'").

Run manually with: uv run pytest -m stress

Sends 100 concurrent MCP requests (50 normal + 50 with abrupt TCP
disconnect) to verify the server handles client disconnects gracefully
and continues serving normal requests.

Marked with @pytest.mark.stress and excluded from default pytest runs.
Run manually with: uv run pytest -m stress

Made-with: Cursor
@bolinocroustibat
bolinocroustibat merged commit a92b55b into main Mar 27, 2026
3 checks passed
@bolinocroustibat
bolinocroustibat deleted the test/stress-test-client-disconnect branch March 27, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants