Skip to content

Commit 130397a

Browse files
Jenkinsopenstack-gerrit
authored andcommitted
Merge "[Optimize] Adds interval and increase waiting time"
2 parents 99bb6f3 + afa1040 commit 130397a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • cinderclient/tests/functional

cinderclient/tests/functional/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def object_cmd(self, object_name, cmd):
108108
return (object_name + '-' + cmd if object_name != 'volume' else cmd)
109109

110110
def wait_for_object_status(self, object_name, object_id, status,
111-
timeout=60):
111+
timeout=120, interval=3):
112112
"""Wait until object reaches given status.
113113
114114
:param object_name: object name
@@ -121,6 +121,7 @@ def wait_for_object_status(self, object_name, object_id, status,
121121
while time.time() - start_time < timeout:
122122
if status in self.cinder(cmd, params=object_id):
123123
break
124+
time.sleep(interval)
124125
else:
125126
self.fail("%s %s did not reach status %s after %d seconds."
126127
% (object_name, object_id, status, timeout))

0 commit comments

Comments
 (0)