File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2929
3030from mcp import MCPError , types
3131from mcp .client .session import ClientSession
32+ from mcp .client .streamable_http import RequestContext as HTTPRequestContext
3233from mcp .client .streamable_http import StreamableHTTPTransport , streamable_http_client
3334from mcp .server import Server , ServerRequestContext
3435from mcp .server .streamable_http import (
@@ -2345,7 +2346,7 @@ async def test_reconnection_attempt_counter_increments_on_clean_disconnect(
23452346
23462347 async def spy_handle_reconnection (
23472348 self : StreamableHTTPTransport ,
2348- ctx : object ,
2349+ ctx : HTTPRequestContext ,
23492350 last_event_id : str ,
23502351 retry_interval_ms : int | None = None ,
23512352 attempt : int = 0 ,
@@ -2369,7 +2370,7 @@ async def spy_handle_reconnection(
23692370 "tool_with_multiple_stream_closes" ,
23702371 {"checkpoints" : 3 , "sleep_time" : 0.6 },
23712372 )
2372- except Exception :
2373+ except Exception : # pragma: no cover
23732374 pass
23742375
23752376 # With the fix: attempts seen are [0, 1, 2] — counter increments on each clean close.
You can’t perform that action at this time.
0 commit comments