Refactor `wait` and `retry_*` methods
What does this MR do?
This refactors the Waiter and Retrier modules.
- Moves
waitinto the Retrier module aswait_until, and renames themaxparameter 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_untilto 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_exceptionparameter to so that it's not necessary to nest wait/retry blocks if you want to do both. - Adds a
raise_on_failureparameter, which is the same asretry_until'sexit_on_failureparameter, but now it can be used withwait_until.
Does this MR meet the acceptance criteria?
Conformity
Edited by Mark Lapierre