Skip to content

Commit

Permalink
update timing test
Browse files Browse the repository at this point in the history
  • Loading branch information
terencehonles committed Sep 3, 2024
1 parent c4ee438 commit 837f304
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,10 +694,11 @@ def test_max_idle_time(self):
self.assertIsNone(w.dequeue_job_and_maintain_ttl(3, max_idle_time=2))
self.assertLess((now() - right_now).total_seconds(), 4) # 4 for some buffer

# idle for 3 seconds because idle_time is less than two rounds of timeout
right_now = now()
w = Worker([q])
w.worker_ttl = 2
right_now = now()

# idle for 3 seconds because idle_time is less than two rounds of timeout
w.work(max_idle_time=3)
self.assertLess((now() - right_now).total_seconds(), 5) # 5 for some buffer

Expand Down

0 comments on commit 837f304

Please sign in to comment.