Skip to content

Commit

Permalink
Merge pull request #175 from tobymao/fix-test-timings
Browse files Browse the repository at this point in the history
Fix: Flaky tests by adjusting timings
  • Loading branch information
tobymao authored Oct 11, 2024
2 parents 7ccb839 + 39917df commit 4b1553a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ async def test_sweep_jobs(self) -> None:
job2 = await self.enqueue("test", ttl=60)
await self.queue.finish(job1, Status.COMPLETE)
await self.queue.finish(job2, Status.COMPLETE)
await asyncio.sleep(1)
await asyncio.sleep(1.5)

await self.queue.sweep()
with self.assertRaisesRegex(RuntimeError, "doesn't exist"):
Expand All @@ -581,7 +581,7 @@ async def test_sweep_jobs(self) -> None:
async def test_sweep_stats(self) -> None:
# Stats are deleted
await self.queue.stats(ttl=1)
await asyncio.sleep(1)
await asyncio.sleep(1.5)
await self.queue.sweep()
async with self.queue.pool.connection() as conn, conn.cursor() as cursor:
await cursor.execute(
Expand Down

0 comments on commit 4b1553a

Please sign in to comment.