summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2019-05-07 12:49:39 +1000
committerMark Lapierre <mlapierre@gitlab.com>2019-05-20 17:09:47 +1000
commitff6aa7906e5ee9faade81e201e72f242caa37478 (patch)
tree2f4574444443d6ac126986b4ae274f73b1a27772
parenta4777d6ea91433a134358de8ca446d96a2e5fd6f (diff)
downloadgitlab-ce-ff6aa7906e5ee9faade81e201e72f242caa37478.tar.gz
Only retry failing QA tests in CIqa-retry-in-ci-only
No need to retry automatically when running tests locally
-rw-r--r--qa/spec/spec_helper.rb8
1 files 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