mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-08 13:12:08 +00:00
test(mcp): unblock recycle-reconnect test from the parked self-probe wait
The salvaged test predates the parked-server self-probe (_PARKED_RETRY_INTERVAL, landed on main after the PR branched): after the final failed retry, run() parks in a real asyncio.wait that the patched asyncio.sleep doesn't cover, stalling the test 300s. Signal shutdown once the retry budget is exhausted so the park exits immediately.
This commit is contained in:
parent
a6203839b4
commit
2d4fd1d52f
1 changed files with 7 additions and 0 deletions
|
|
@ -2158,6 +2158,13 @@ class TestReconnection:
|
|||
run_count += 1
|
||||
if target_server is not self_srv:
|
||||
return await original_run_stdio(self_srv, config)
|
||||
# After the final retry, run() parks in
|
||||
# _wait_for_reconnect_or_shutdown(timeout=_PARKED_RETRY_INTERVAL)
|
||||
# (a real asyncio.wait — the patched asyncio.sleep doesn't cover
|
||||
# it). Signal shutdown so the park exits immediately instead of
|
||||
# blocking the test for the 300s self-probe interval.
|
||||
if run_count > _MAX_INITIAL_CONNECT_RETRIES:
|
||||
self_srv._shutdown_event.set()
|
||||
raise ConnectionError("recycle reconnect failed")
|
||||
|
||||
async def _test():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue