Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

queue: Use low-level queue_purge to empty at the end of tests.

Alex Vandiver571f8b866427
diff --git a/zerver/tests/test_queue.py b/zerver/tests/test_queue.py
index 095444dd4ec..cc44c354d55 100644
--- a/zerver/tests/test_queue.py
+++ b/zerver/tests/test_queue.py
@@ -131,6 +131,6 @@ class TestQueueImplementation(ZulipTestCase):
@override_settings(USING_RABBITMQ=True)
def tearDown(self) -> None:
queue_client = get_queue_client()
- with queue_client.drain_queue("test_suite"):
- pass
+ assert queue_client.channel
+ queue_client.channel.queue_purge("test_suite")
super().tearDown()