mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 04:54:17 +02:00
Skip timeout tests on windows
This commit is contained in:
parent
6697a165db
commit
a0e69a4cb2
3 changed files with 13 additions and 8 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import asyncio
|
||||
import sys
|
||||
from typing import cast
|
||||
|
||||
import pytest
|
||||
|
|
@ -509,6 +510,10 @@ class TestErrorHandling:
|
|||
assert "This is a resource error (xyz)" in str(excinfo.value)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "win32",
|
||||
reason="Timeout tests are flaky on Windows. Timeouts *are* supported but the tests are unreliable.",
|
||||
)
|
||||
class TestTimeout:
|
||||
async def test_timeout(self, fastmcp_server: FastMCP):
|
||||
async with Client(
|
||||
|
|
|
|||
|
|
@ -136,11 +136,11 @@ async def test_nested_sse_server_resolves_correctly():
|
|||
assert result is True
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "win32",
|
||||
reason="Timeout tests are flaky on Windows. Timeouts *are* supported but the tests are unreliable.",
|
||||
)
|
||||
class TestTimeout:
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "win32",
|
||||
reason="This test is flaky on Windows. Sometimes the client timeout is respected and sometimes it is not.",
|
||||
)
|
||||
async def test_timeout(self, sse_server: str):
|
||||
with pytest.raises(
|
||||
McpError,
|
||||
|
|
@ -167,10 +167,6 @@ class TestTimeout:
|
|||
with pytest.raises(McpError, match="Timed out"):
|
||||
await client.call_tool("sleep", {"seconds": 0.1}, timeout=0.01)
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "win32",
|
||||
reason="This test is flaky on Windows. Sometimes the client timeout is respected and sometimes it is not.",
|
||||
)
|
||||
async def test_timeout_client_timeout_does_not_override_tool_call_timeout_if_lower(
|
||||
self, sse_server: str
|
||||
):
|
||||
|
|
|
|||
|
|
@ -149,6 +149,10 @@ async def test_nested_streamable_http_server_resolves_correctly():
|
|||
assert result is True
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.platform == "win32",
|
||||
reason="Timeout tests are flaky on Windows. Timeouts *are* supported but the tests are unreliable.",
|
||||
)
|
||||
class TestTimeout:
|
||||
async def test_timeout(self, streamable_http_server: str):
|
||||
# note this transport behaves differently than others and raises
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue