mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add time limit to while loop
This commit is contained in:
parent
aeb5f4e248
commit
9a35a73711
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue