fix reactor ping test

This commit is contained in:
Daniel A. Wozniak 2019-02-19 18:34:28 +00:00
parent 86adb6b0fe
commit 927219ca9c
No known key found for this signature in database
GPG key ID: 166B9D2C06C82D61

View file

@ -665,16 +665,19 @@ def _fetch_events(q):
queue_item.task_done()
atexit.register(_clean_queue)
opts = RUNTIME_VARS.RUNTIME_CONFIGS['minion']
event = salt.utils.event.get_event('minion', sock_dir=opts['sock_dir'], opts=opts)
a_config = AdaptedConfigurationTestCaseMixin()
event = salt.utils.event.get_event(
'minion',
sock_dir=a_config.get_config('minion')['sock_dir'],
opts=a_config.get_config('minion'),
)
while True:
try:
events = event.get_event(full=False)
except Exception:
except Exception as exc:
# This is broad but we'll see all kinds of issues right now
# if we drop the proc out from under the socket while we're reading
pass
log.exception("Exception caught while getting events %r", exc)
q.put(events)