From 54b81d3ae8bb95c24c2f2094b5497e9975a19d02 Mon Sep 17 00:00:00 2001 From: Vanshdeep Singh Date: Wed, 8 Aug 2018 14:23:07 +0200 Subject: [PATCH] Problem: Random failure for event handler test (#2423) Solution: Random failure of test `tests/test_events.py::test_event_handler_raises_when_called_after_start` seem to be because of `get_nowait` which returns way to quickly even when the queue has data. Increasing timeout seems to fix the issue. --- bigchaindb/events.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bigchaindb/events.py b/bigchaindb/events.py index 7959d284..e11037cb 100644 --- a/bigchaindb/events.py +++ b/bigchaindb/events.py @@ -67,7 +67,7 @@ class Exchange: """ try: - self.started_queue.get_nowait() + self.started_queue.get(timeout=1) raise RuntimeError('Cannot create a new subscriber queue while Exchange is running.') except Empty: pass