Skip to content

πŸš€ The fast, Pythonic way to build MCP servers and clients.

Give the timeout-override test headroom for the follow-up tools/list (#5875)

nate nowackcb20ad6f139e
diff --git a/tests/client/client/test_timeout.py b/tests/client/client/test_timeout.py
index d770aa04f..663169297 100644
--- a/tests/client/client/test_timeout.py
+++ b/tests/client/client/test_timeout.py
@@ -37,8 +37,10 @@ class TestTimeout:
async def test_timeout_tool_call_overrides_client_timeout_even_if_lower(
self, fastmcp_server: FastMCP
):
+ # The client timeout still bounds the SDK's follow-up `tools/list` (it
+ # fetches output schemas after the call), so it needs real headroom.
async with Client(
transport=FastMCPTransport(fastmcp_server),
- timeout=0.1,
+ timeout=0.5,
) as client:
- await client.call_tool("sleep", {"seconds": 0.5}, timeout=2)
+ await client.call_tool("sleep", {"seconds": 1}, timeout=3)