test(mcp): stdio arm of the transport-rebuild test now expects no replay
The parametrized lifecycle test drove both transports through a ClosedResourceError on the first call_tool and asserted a replay. For the HTTP arm that is still the session-expired contract; for the stdio arm a pipe closing after dispatch is now the ambiguous mid-call death and must surface outcome_uncertain with exactly one invocation. The transport is still rebuilt on both arms.
This commit is contained in:
@@ -196,8 +196,14 @@ def test_call_tool_handler_rebuilds_configured_server_transport(
|
||||
handler = _make_tool_handler("resumed", "health", 10.0)
|
||||
parsed = json.loads(handler({}))
|
||||
|
||||
assert parsed == {"result": "reconnected"}
|
||||
assert call_count["n"] == 2
|
||||
if expected_route == "stdio":
|
||||
# A stdio pipe closing after dispatch is an ambiguous mid-call death: the transport
|
||||
# is rebuilt for future calls, but the call itself is not replayed (#106440).
|
||||
assert parsed["outcome_uncertain"] is True, parsed
|
||||
assert call_count["n"] == 1
|
||||
else:
|
||||
assert parsed == {"result": "reconnected"}
|
||||
assert call_count["n"] == 2
|
||||
assert routes == [expected_route, expected_route]
|
||||
assert configs == [transport_config, transport_config]
|
||||
assert len(sessions) == 2
|
||||
|
||||
Reference in New Issue
Block a user