Spaces:
Running
Running
Merge pull request #486 from davenpi/fix-flaky-timeout-test
Browse files
tests/client/test_client.py
CHANGED
|
@@ -512,11 +512,11 @@ class TestErrorHandling:
|
|
| 512 |
class TestTimeout:
|
| 513 |
async def test_timeout(self, fastmcp_server: FastMCP):
|
| 514 |
async with Client(
|
| 515 |
-
transport=FastMCPTransport(fastmcp_server), timeout=0.
|
| 516 |
) as client:
|
| 517 |
with pytest.raises(
|
| 518 |
McpError,
|
| 519 |
-
match="Timed out while waiting for response to ClientRequest. Waited 0.
|
| 520 |
):
|
| 521 |
await client.call_tool("sleep", {"seconds": 0.1})
|
| 522 |
|
|
|
|
| 512 |
class TestTimeout:
|
| 513 |
async def test_timeout(self, fastmcp_server: FastMCP):
|
| 514 |
async with Client(
|
| 515 |
+
transport=FastMCPTransport(fastmcp_server), timeout=0.05
|
| 516 |
) as client:
|
| 517 |
with pytest.raises(
|
| 518 |
McpError,
|
| 519 |
+
match="Timed out while waiting for response to ClientRequest. Waited 0.05 seconds",
|
| 520 |
):
|
| 521 |
await client.call_tool("sleep", {"seconds": 0.1})
|
| 522 |
|