Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
improve wait logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoriaaa committed May 21, 2019
1 parent 32096d5 commit 3e3f68d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions supports/integration-test/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,14 @@ def wait_cmdlets(cids):
num_complete = 0
complete = False
while not complete:
for cid in cids:
cmdlet = get_cmdlet(cid)
i = 0
while i < len(cids):
cmdlet = get_cmdlet(cids[i])
if cmdlet['state'] == "DONE" or cmdlet['state'] == "FAILED":
num_complete += 1
cids.pop(i)
else:
i += 1
if num_complete == num_cmds:
complete = True
if complete:
Expand Down

0 comments on commit 3e3f68d

Please sign in to comment.