From 59400262455b4c4df6721c9b8b598eaade09f1ba Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Tue, 28 Jul 2026 21:55:21 -0700 Subject: [PATCH] test(photon): drain detached fatal-notification task in zombie watchdog test The lifecycle cluster made fatal notifications detached; the watchdog test still asserted synchronously. --- .../platforms/photon/test_zombie_stream_watchdog.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/plugins/platforms/photon/test_zombie_stream_watchdog.py b/tests/plugins/platforms/photon/test_zombie_stream_watchdog.py index e3f9dd6749fb4..b8b9689f8bf50 100644 --- a/tests/plugins/platforms/photon/test_zombie_stream_watchdog.py +++ b/tests/plugins/platforms/photon/test_zombie_stream_watchdog.py @@ -23,6 +23,7 @@ gRPC traffic occurs. """ from __future__ import annotations +import asyncio import json import subprocess from pathlib import Path @@ -240,6 +241,13 @@ async def test_monitor_still_raises_fatal_when_zombie_degrades_stream( await adapter._monitor_sidecar_health() + # Fatal notification is dispatched from a detached task (so callers can't + # cancel their own handoff) — drain pending tasks before asserting. + for _ in range(50): + if notified: + break + await asyncio.sleep(0) + assert adapter.has_fatal_error is True assert adapter.fatal_error_code == "UPSTREAM_STREAM_DEGRADED" assert adapter.fatal_error_retryable is True