check timeout when queue empty

This commit is contained in:
Daniel A. Wozniak 2019-04-14 17:45:20 +00:00 committed by Pedro Algarvio
parent 7c0a9af3d0
commit 517650f87b
No known key found for this signature in database
GPG Key ID: BB36BF6584A298FF

View File

@ -712,6 +712,8 @@ class SaltMinionEventAssertsMixin(object):
event = self.q.get(False) event = self.q.get(False)
except Empty: except Empty:
time.sleep(sleep_time) time.sleep(sleep_time)
if start - time.time() >= timeout:
break
continue continue
if isinstance(event, dict): if isinstance(event, dict):
event.pop('_stamp') event.pop('_stamp')