Skip to content

Commit 4dd8535

Browse files
author
Andrei Neagu
committed
avoid tests form hanging
1 parent d1fad6f commit 4dd8535

File tree

1 file changed

+2
-1
lines changed
  • packages/service-library/tests/long_running_tasks

1 file changed

+2
-1
lines changed

packages/service-library/tests/long_running_tasks/conftest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
# pylint: disable=redefined-outer-name
33
# pylint: disable=unused-argument
44

5+
import asyncio
56
import logging
67
from collections.abc import AsyncIterable, AsyncIterator, Awaitable, Callable
78
from datetime import timedelta
@@ -61,7 +62,7 @@ async def _(
6162

6263
for manager in managers:
6364
with log_catch(_logger, reraise=False):
64-
await manager.teardown()
65+
await asyncio.wait_for(manager.teardown(), timeout=5)
6566

6667

6768
@pytest.fixture

0 commit comments

Comments
 (0)