[QA] Change 'wait' method logic if no timeout is set
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Committed
|
Medium
|
Andrey Sledzinskiy |
Bug Description
In devops/
def wait(predicate, interval=5, timeout=None):
start_time = time.time()
while not predicate():
if timeout and start_time + timeout < time.time():
raise TimeoutError(
if timeout:
0,
return timeout + start_time - time.time() if timeout else 0
If timeout wasn't set we can have situation when predicate is always False and we stuck in infinite loop - we will sleep every 5 seconds and never timed out.
Method need to be refactored
tags: |
added: fuel-devops removed: devops |
summary: |
- [Devops] Change 'wait' method logic if no timeout is set + [QA] Change 'wait' method logic if no timeout is set |
Fix proposed to branch: master /review. openstack. org/110673
Review: https:/