Class: Simmer::ReRunner

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/simmer/re_runner.rb

Overview

:nodoc: Wraps a Simmer::Runner and knows how to re-run tests based on certain failure cases.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(runner, out, timeout_failure_retry_count: 0) ⇒ ReRunner

Returns a new instance of ReRunner.



20
21
22
23
24
25
# File 'lib/simmer/re_runner.rb', line 20

def initialize(runner, out, timeout_failure_retry_count: 0)
  @timeout_failure_retry_count = timeout_failure_retry_count.to_i
  @out = out

  super(runner)
end

Instance Attribute Details

#timeout_failure_retry_countObject (readonly)

Returns the value of attribute timeout_failure_retry_count.



18
19
20
# File 'lib/simmer/re_runner.rb', line 18

def timeout_failure_retry_count
  @timeout_failure_retry_count
end

Instance Method Details

#run(*args) ⇒ Object



27
28
29
# File 'lib/simmer/re_runner.rb', line 27

def run(*args)
  rerun_on_timeout(args, timeout_failure_retry_count)
end