Skip to content

The agent that grows with you

test(gateway): hosted-room recovery waits out the predecessor's 30s lease

teknium1df239f38cac8
diff --git a/tests/gateway/test_session_hosted_daemon.py b/tests/gateway/test_session_hosted_daemon.py
index fda0f302f84..63c6f213b9b 100644
--- a/tests/gateway/test_session_hosted_daemon.py
+++ b/tests/gateway/test_session_hosted_daemon.py
@@ -161,7 +161,10 @@ def test_room_unknown_discard_releases_only_its_followers(tmp_path):
async def recovered(desc):
async with websocket(home, desc) as ws:
- async with asyncio.timeout(30):
+ # The killed owner's room lease is same-gateway with a fresh process
+ # generation, so the restarted owner cannot steal it and waits out the
+ # 30s TTL (acquire_lease -> LeaseHeldError until expiry). Measured 30.2s.
+ async with asyncio.timeout(90):
while True:
snapshot = await state(ws)
actions = [a for a in snapshot['pending_actions'] if a['kind'] == 'discard']