From 3ca348049fed751e6c40cef4904dbb3673508e10 Mon Sep 17 00:00:00 2001 From: Selwin Ong Date: Sun, 28 Apr 2024 19:37:53 +0700 Subject: [PATCH] Ensure intermediate_queue is empty before running tests --- tests/test_intermediate_queue.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_intermediate_queue.py b/tests/test_intermediate_queue.py index 04effc8b..feaf1bf6 100644 --- a/tests/test_intermediate_queue.py +++ b/tests/test_intermediate_queue.py @@ -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)