Skip to content

Commit

Permalink
chore(ci): Apply pytest-timeout to test_bgtask (#3226)
Browse files Browse the repository at this point in the history
Backported-from: main (24.12)
Backported-to: 24.09
Backport-of: 3226
  • Loading branch information
achimnol committed Dec 9, 2024
1 parent eec807b commit 17368f8
Show file tree
Hide file tree
Showing 3 changed files with 284 additions and 164 deletions.
2 changes: 2 additions & 0 deletions tests/manager/api/test_bgtask.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from ai.backend.manager.server import background_task_ctx, event_dispatcher_ctx, shared_config_ctx


@pytest.mark.timeout(60)
@pytest.mark.asyncio
async def test_background_task(etcd_fixture, create_app_and_client) -> None:
app, client = await create_app_and_client(
Expand Down Expand Up @@ -84,6 +85,7 @@ async def _mock_task(reporter):
await dispatcher.close()


@pytest.mark.timeout(60)
@pytest.mark.asyncio
async def test_background_task_fail(etcd_fixture, create_app_and_client) -> None:
app, client = await create_app_and_client(
Expand Down
1 change: 1 addition & 0 deletions tools/pytest-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ pytest-cov>=5.0
pytest-custom_exit_code>=0.3.0
pytest-dependency>=0.6.0
pytest-mock>=3.14.0
pytest-timeout>=2.3.1
aioresponses>=0.7.6
Loading

0 comments on commit 17368f8

Please sign in to comment.