Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/qa/spec
diff options
context:
space:
mode:
authorMark Lapierre <mlapierre@gitlab.com>2019-05-07 05:49:39 +0300
committerMark Lapierre <mlapierre@gitlab.com>2019-05-20 10:09:47 +0300
commitff6aa7906e5ee9faade81e201e72f242caa37478 (patch)
tree2f4574444443d6ac126986b4ae274f73b1a27772 /qa/spec
parenta4777d6ea91433a134358de8ca446d96a2e5fd6f (diff)
Only retry failing QA tests in CI
No need to retry automatically when running tests locally
Diffstat (limited to 'qa/spec')
-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