Refactor `wait` and `retry_*` methods
What does this MR do?
This refactors the Waiter and Retrier modules.
- Moves
wait
into the Retrier module aswait_until
, and renames themax
parameter tomax_duration
, to convey that its purpose is similar toretry_until
. - Combines the loop logic into a single private method that the different public wait/retry methods use.
- Allows
retry_until
to retry up to a certain maximum time limit, likewait_until
, as well as the original functionality of waiting until a specified condition is met. - Adds a
retry_on_exception
parameter to so that it's not necessary to nest wait/retry blocks if you want to do both. - Adds a
raise_on_failure
parameter, which is the same asretry_until
'sexit_on_failure
parameter, but now it can be used withwait_until
.
Does this MR meet the acceptance criteria?
Conformity
Edited by Mark Lapierre