X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fspec_helper_acceptance.rb;h=29b178a51e3a8a125f65e273dc66e9e086c29658;hb=337435e42bba9c4044f2e87ff4b29f70141295ce;hp=a6f3d853b6115a6f0fbefc97307548f6d7f07607;hpb=ede3eddf3ca5a64ca29c869fba33880b9acdc631;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index a6f3d85..29b178a 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -14,8 +14,8 @@ install_module_on(hosts) install_module_dependencies_on(hosts) UNSUPPORTED_PLATFORMS = ['RedHat', 'Suse', 'windows', 'AIX', 'Solaris'].freeze -MAX_RETRY_COUNT = 12 -RETRY_WAIT = 10 +MAX_RETRY_COUNT = 5 +RETRY_WAIT = 3 ERROR_MATCHER = %r{(no valid OpenPGP data found|keyserver timed out|keyserver receive failed)} # This method allows a block to be passed in and if an exception is raised @@ -36,7 +36,7 @@ def retry_on_error_matching(max_retry_count = MAX_RETRY_COUNT, retry_wait_interv try += 1 yield rescue StandardError => e - raise unless try < max_retry_count && (error_matcher.nil? || e.message =~ error_matcher) + raise(_('Attempted this %{value0} times. Raising %{value1}') % { value0: max_retry_count, value1: e }) unless try < max_retry_count && (error_matcher.nil? || e.message =~ error_matcher) sleep retry_wait_interval_secs retry end @@ -65,12 +65,6 @@ RSpec.configure do |c| install_language_on(host, 'ja_JP.utf-8') if not_controller(host) # This will be removed, this is temporary to test localisation. end - # Required for binding tests. - if fact('osfamily') == 'RedHat' - if fact('operatingsystemmajrelease') =~ %r{7} || fact('operatingsystem') =~ %r{Fedora} - shell('yum install -y bzip2') - end - end on host, puppet('module', 'install', 'stahnma/epel') end end