File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ def test_is_session_expired_detects_session_not_found():
4646 assert _is_session_expired_error (RuntimeError ("Unknown session: abc123" )) is True
4747
4848
49+ def test_is_session_expired_detects_session_terminated ():
50+ """Remote Playwright MCP reports transport loss as ``Session terminated``."""
51+ from tools .mcp_tool import _is_session_expired_error
52+
53+ assert _is_session_expired_error (RuntimeError ("Session terminated" )) is True
54+
55+
4956def test_is_session_expired_is_case_insensitive ():
5057 """Match uses lower-cased comparison so servers that emit the
5158 message in different cases (SDK formatter quirks) still trigger."""
Original file line number Diff line number Diff line change @@ -1667,6 +1667,7 @@ async def _recover():
16671667 "session expired" ,
16681668 "session not found" ,
16691669 "unknown session" ,
1670+ "session terminated" ,
16701671)
16711672
16721673
You can’t perform that action at this time.
0 commit comments