Skip to content

Commit 5641827

Browse files
committed
fix: Add global 60s timeout to all tests to prevent infinite hangs
- Add pytest-timeout to dev dependencies - Configure 60s timeout for all tests with thread method - This prevents the 14+ hour CI hangs we've been experiencing - Tests that take longer than 60s are likely hanging/deadlocked
1 parent 908cbf7 commit 5641827

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ dependencies = [
3939
rich = ["rich>=13.9.4"]
4040
cli = ["typer>=0.16.0", "python-dotenv>=1.0.0"]
4141
ws = ["websockets>=15.0.1"]
42+
test-timeout = [
43+
"pytest-timeout>=2.1.0",
44+
]
4245

4346
[project.scripts]
4447
mcp = "mcp.cli:app [cli]"
@@ -57,6 +60,7 @@ dev = [
5760
"pytest-xdist>=3.6.1",
5861
"pytest-examples>=0.0.14",
5962
"pytest-pretty>=1.2.0",
63+
"pytest-timeout>=2.1.0",
6064
"inline-snapshot>=0.23.0",
6165
"dirty-equals>=0.9.0",
6266
]
@@ -119,6 +123,8 @@ addopts = """
119123
--color=yes
120124
--capture=fd
121125
--numprocesses auto
126+
--timeout=60
127+
--timeout-method=thread
122128
"""
123129
# Disable parallelization for integration tests that spawn subprocesses
124130
# This prevents Windows issues with multiprocessing + subprocess conflicts

uv.lock

Lines changed: 17 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)