Ensure intermediate_queue is empty before running tests

This commit is contained in:
Selwin Ong 2024-04-28 19:37:53 +07:00
parent 7d4c7eee30
commit 3ca348049f
1 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,9 @@ class TestWorker(RQTestCase):
intermediate_queue = IntermediateQueue(queue.key, connection=self.connection)
# Ensure that the intermediate queue is empty
self.connection.delete(intermediate_queue.key)
# Job ID is not in intermediate queue
self.assertEqual(intermediate_queue.get_job_ids(), [])
job, queue = Queue.dequeue_any([queue], timeout=None, connection=self.testconn)