Skip to content

Commit

Permalink
Improve CI: retry flaky tests (#379)
Browse files Browse the repository at this point in the history
* retry tests

* update

* update
  • Loading branch information
aniketmaurya authored Dec 3, 2024
1 parent 43d9928 commit 103bd70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions _requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ transformers
openai>=1.12.0
pillow
numpy <2.0
pytest-retry>=1.6.3
2 changes: 2 additions & 0 deletions tests/test_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def unbatch(self, output):
return list(output)


@pytest.mark.flaky(retries=3)
@pytest.mark.asyncio
async def test_timeout():
# Scenario: first request completes, second request times out in queue
Expand Down Expand Up @@ -172,6 +173,7 @@ async def test_timeout():
)


@pytest.mark.flaky(retries=3)
@pytest.mark.asyncio
async def test_batch_timeout():
# Scenario: first 2 requests finish as a batch and third request times out in queue
Expand Down

0 comments on commit 103bd70

Please sign in to comment.