mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 06:23:38 +00:00
queue_processors: Avoid queue worker timeouts in tests.
For tests that use the dev server, like test-api, test-js-with-puppeteer, we don't have the consumers for the queues. As they eventually timeout, we get unnecessary error messages. This adds a new flag, disable_timeout, to disable this behavior for the test cases.
This commit is contained in:
committed by
Tim Abbott
parent
a686c0cc02
commit
b6d1e56cac
@@ -431,10 +431,11 @@ def queue_json_publish(
|
||||
elif processor:
|
||||
processor(event)
|
||||
else:
|
||||
# The else branch is only hit during tests, where rabbitmq is not enabled.
|
||||
# Must be imported here: A top section import leads to circular imports
|
||||
from zerver.worker.queue_processors import get_worker
|
||||
|
||||
get_worker(queue_name).consume_single_event(event)
|
||||
get_worker(queue_name, disable_timeout=True).consume_single_event(event)
|
||||
|
||||
|
||||
def retry_event(
|
||||
|
||||
Reference in New Issue
Block a user