Skip to content

Commit

Permalink
Problem: Random failure for event handler test (#2423)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kansi authored and vrde committed Aug 8, 2018
1 parent 66fd001 commit 54b81d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bigchaindb/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def get_subscriber_queue(self, event_types=None):
"""

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
Expand Down

0 comments on commit 54b81d3

Please sign in to comment.