X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Facceptance%2Fapt_spec.rb;h=52415f5afaecb4e0cfe28fbe2af689c3ffad3f77;hb=57c7b88f9badbf2acef29e6f9453d574d3101b29;hp=86c93ffa87913540069653d707974f67282c011a;hpb=a17f128714bc02110dd273ef1c43bf093ae09c14;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/acceptance/apt_spec.rb b/spec/acceptance/apt_spec.rb index 86c93ff..52415f5 100644 --- a/spec/acceptance/apt_spec.rb +++ b/spec/acceptance/apt_spec.rb @@ -1,5 +1,9 @@ require 'spec_helper_acceptance' +MAX_TIMEOUT_RETRY = 3 +TIMEOUT_RETRY_WAIT = 5 +TIMEOUT_ERROR_MATCHER = /no valid OpenPGP data found/ + describe 'apt class' do context 'reset' do @@ -42,8 +46,12 @@ describe 'apt class' do } EOS + #Apply the manifest (Retry if timeout error is received from key pool) + retry_on_error_matching(MAX_TIMEOUT_RETRY, TIMEOUT_RETRY_WAIT, TIMEOUT_ERROR_MATCHER) do + apply_manifest(pp, :catch_failures => true) + end + apply_manifest(pp, :catch_failures => true) - apply_manifest(pp, :catch_changes => true) end it 'should still work' do shell('apt-get update')