From 208ac4fac7fe3526b9245f3b91b8352e21c0b0a6 Mon Sep 17 00:00:00 2001 From: Roland Date: Fri, 23 Jan 2026 15:28:40 -0700 Subject: [PATCH] Tuning test timeouts. --- wrolpi/common.py | 2 +- wrolpi/conftest.py | 2 +- wrolpi/switches.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wrolpi/common.py b/wrolpi/common.py index e1df1aec..e96531c6 100644 --- a/wrolpi/common.py +++ b/wrolpi/common.py @@ -1825,7 +1825,7 @@ async def cancel_background_tasks(): await asyncio.gather(*BACKGROUND_TASKS) -async def await_background_tasks(timeout: int = 15): +async def await_background_tasks(timeout: int = 10): """Awaits all background tasks, used only for testing. Processes the FileWorker queue concurrently with background tasks to avoid diff --git a/wrolpi/conftest.py b/wrolpi/conftest.py index 1e9c040d..9a704301 100644 --- a/wrolpi/conftest.py +++ b/wrolpi/conftest.py @@ -297,7 +297,7 @@ async def await_background_tasks(async_client, test_session): """ await async_client.get('/api') - async def _await_and_expire(timeout: int = 15): + async def _await_and_expire(timeout: int = 10): await await_background_tasks_(timeout=timeout) test_session.expire_all() diff --git a/wrolpi/switches.py b/wrolpi/switches.py index c680e428..669a458b 100644 --- a/wrolpi/switches.py +++ b/wrolpi/switches.py @@ -129,7 +129,7 @@ async def switch_worker(): switches_changed.clear() -async def await_switches(timeout: int = 10): +async def await_switches(timeout: int = 8): if not PYTEST: raise RuntimeError('This function is only for testing purposes')