Module: OpsManagerUiDrivers::WaitHelper
- Included in:
- PageHelpers
- Defined in:
- lib/ops_manager_ui_drivers/wait_helper.rb
Constant Summary collapse
- SLEEP_INTERVAL =
0.5- EarlyFailException =
Class.new(Exception)
Instance Method Summary collapse
- #fail_early(msg) ⇒ Object
- #poll_up_to_mins(minutes, &blk) ⇒ Object
- #poll_up_to_times(times, &blk) ⇒ Object
Instance Method Details
#fail_early(msg) ⇒ Object
9 10 11 |
# File 'lib/ops_manager_ui_drivers/wait_helper.rb', line 9 def fail_early(msg) fail(EarlyFailException.new(msg)) end |
#poll_up_to_mins(minutes, &blk) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/ops_manager_ui_drivers/wait_helper.rb', line 13 def poll_up_to_mins(minutes, &blk) title = "Polling for #{minutes} mins" Logger.debug "--- BEGIN #{title}" retry_until(minutes_to_time(minutes), &blk) ensure Logger.debug "--- END #{title}" end |