• Mark Lapierre's avatar
    Refactor `wait` and `retry_*` methods · 8802b619
    Mark Lapierre authored
    This is the first step in refactoring the Waiter and Retrier modules
    
    * Moves wait into the Retrier module as wait_until, and renames
      the max parameter to max_duration, to convey that its purpose
      is similar to retry_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,
      like wait_until, as well as the original funtionality 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 as
      retry_until's exit_on_failure parameter, but now it can be used
      with wait_until.
    
    Code review change to improve error message
    8802b619
waiter_spec.rb 1.9 KB