From c3b08f73e5531fb4436c6b90725aa5009fb1d705 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Tue, 23 Dec 2025 15:23:42 +0000 Subject: [PATCH] Fix flaky test (#11867) --- tests/test_run_app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_run_app.py b/tests/test_run_app.py index 622fa560e24..dab36942e49 100644 --- a/tests/test_run_app.py +++ b/tests/test_run_app.py @@ -1284,6 +1284,7 @@ async def run_test(app: web.Application) -> AsyncIterator[None]: nonlocal t t = asyncio.create_task(test()) yield + await asyncio.sleep(0) # In case test() hasn't resumed yet. t.cancel() with contextlib.suppress(asyncio.CancelledError): await t