From 43eb643910244c509fbd630118df6cf14851e5ea Mon Sep 17 00:00:00 2001 From: rayhpeng Date: Fri, 22 May 2026 18:01:55 +0800 Subject: [PATCH] fix run manager test cleanup await --- backend/tests/test_run_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/tests/test_run_manager.py b/backend/tests/test_run_manager.py index 4b88c8501..fef9e8d95 100644 --- a/backend/tests/test_run_manager.py +++ b/backend/tests/test_run_manager.py @@ -2,7 +2,6 @@ import asyncio import re -from contextlib import suppress import pytest @@ -298,13 +297,14 @@ async def test_create_does_not_expose_run_until_store_persist_completes(): assert [run.run_id for run in runs] == [record.run_id] finally: allow_put.set() + cleanup_tasks = [] for task in (list_task, create_task): if task is None: continue if not task.done(): task.cancel() - with suppress(asyncio.CancelledError): - await task + cleanup_tasks.append(task) + await asyncio.gather(*cleanup_tasks, return_exceptions=True) @pytest.mark.anyio