test(gateway): update startup-restart-race fixtures for current main
The salvaged test double predated two main changes: - start() now connects via _connect_adapter_with_timeout, which forwards is_reconnect to adapter.connect(); the StartupRaceAdapter double didn't accept the kwarg. - stop() now awaits _finalize_shutdown_agents (async on main); the fixture stubbed it as a plain MagicMock. Accept is_reconnect in the double and use AsyncMock for the finalize stub.
This commit is contained in:
parent
f4a54b6292
commit
fee3d4ed04
1 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ class StartupRaceAdapter(BasePlatformAdapter):
|
|||
self.disconnected = False
|
||||
self.background_cancelled = False
|
||||
|
||||
async def connect(self):
|
||||
async def connect(self, *, is_reconnect: bool = False):
|
||||
if self.on_connect:
|
||||
self.on_connect()
|
||||
if self.wait_for_disconnect is not None:
|
||||
|
|
@ -98,7 +98,7 @@ def make_startup_runner(tmp_path):
|
|||
runner._suspend_stuck_loop_sessions = MagicMock(return_value=0)
|
||||
runner._notify_active_sessions_of_shutdown = AsyncMock()
|
||||
runner._drain_active_agents = AsyncMock(return_value=({}, False))
|
||||
runner._finalize_shutdown_agents = MagicMock()
|
||||
runner._finalize_shutdown_agents = AsyncMock()
|
||||
runner._send_update_notification = AsyncMock(return_value=False)
|
||||
runner._schedule_update_notification_watch = MagicMock()
|
||||
runner._send_restart_notification = AsyncMock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue