From ff6aa7906e5ee9faade81e201e72f242caa37478 Mon Sep 17 00:00:00 2001 From: Mark Lapierre Date: Tue, 7 May 2019 12:49:39 +1000 Subject: Only retry failing QA tests in CI No need to retry automatically when running tests locally --- qa/spec/spec_helper.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qa/spec/spec_helper.rb b/qa/spec/spec_helper.rb index 24ff1523ba7..a368ffba711 100644 --- a/qa/spec/spec_helper.rb +++ b/qa/spec/spec_helper.rb @@ -35,8 +35,10 @@ RSpec.configure do |config| # show exception that triggers a retry if verbose_retry is set to true config.display_try_failure_messages = true - config.around do |example| - retry_times = example.metadata.keys.include?(:quarantine) ? 1 : 2 - example.run_with_retry retry: retry_times + if ENV['CI'] + config.around do |example| + retry_times = example.metadata.keys.include?(:quarantine) ? 1 : 2 + example.run_with_retry retry: retry_times + end end end -- cgit v1.2.1