Class: TestCenter::Helper::MultiScanManager::RetryingScan
- Inherits:
-
Object
- Object
- TestCenter::Helper::MultiScanManager::RetryingScan
- Defined in:
- lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan.rb
Class Method Summary collapse
-
.run(options) ⇒ Object
:nocov:.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RetryingScan
constructor
A new instance of RetryingScan.
-
#run ⇒ Object
:nocov:.
Constructor Details
#initialize(options = {}) ⇒ RetryingScan
Returns a new instance of RetryingScan.
5 6 7 8 |
# File 'lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan.rb', line 5 def initialize( = {}) @options = @retrying_scan_helper = RetryingScanHelper.new(@options) end |
Class Method Details
.run(options) ⇒ Object
:nocov:
11 12 13 |
# File 'lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan.rb', line 11 def self.run() RetryingScan.new().run end |
Instance Method Details
#run ⇒ Object
:nocov:
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fastlane/plugin/test_center/helper/multi_scan_manager/retrying_scan.rb', line 16 def run try_count = @options[:try_count] || 1 begin @retrying_scan_helper.before_testrun Scan::Runner.new.run @retrying_scan_helper.after_testrun true rescue FastlaneCore::Interface::FastlaneTestFailure => e @retrying_scan_helper.after_testrun(e) retry if @retrying_scan_helper.testrun_count < try_count false rescue FastlaneCore::Interface::FastlaneBuildFailure => e @retrying_scan_helper.after_testrun(e) retry if @retrying_scan_helper.testrun_count < try_count false end end |