add time limit to while loop

This commit is contained in:
Ch3LL 2018-01-05 16:18:31 -05:00
parent aeb5f4e248
commit 9a35a73711
No known key found for this signature in database
GPG key ID: 132B55A7C13EFA73

View file

@ -172,7 +172,10 @@ class SSHStateTest(SSHCase):
self.assertIn(ret, ' '.join(get_sls))
# make sure we wait until the earlier state is complete
future = time.time() + 120
while True:
if time.time() > future:
break
if ret not in ' '.join(self.run_function('state.running', wipe=False)):
break