diff options
author | Rémy Coutable <remy@rymai.me> | 2017-07-19 19:51:59 +0200 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-08-11 14:55:10 +0200 |
commit | 8f8fd342313b0cd459d2fedb5b461b0cc063f248 (patch) | |
tree | 87ea1fc1a405d1a0f50165e69e4f12508257d75a /spec/spec_helper.rb | |
parent | c62ae6cfd70d518386fdbcb9714d18ac4f5e8c31 (diff) | |
download | gitlab-ce-8f8fd342313b0cd459d2fedb5b461b0cc063f248.tar.gz |
Use a new RspecFlakyListener to detect flaky specs
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0ba6ed56314..7b7d4887a08 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -69,6 +69,12 @@ RSpec.configure do |config| config.raise_errors_for_deprecations! + if ENV['CI'] + # This includes the first try, i.e. tests will be run 4 times before failing. + config.default_retry_count = 4 + config.reporter.register_listener(RspecFlaky::Listener.new, :example_passed, :dump_summary) + end + config.before(:suite) do TestEnv.init end @@ -97,12 +103,6 @@ RSpec.configure do |config| reset_delivered_emails! end - if ENV['CI'] - config.around(:each) do |ex| - ex.run_with_retry retry: 2 - end - end - config.around(:each, :use_clean_rails_memory_store_caching) do |example| caching_store = Rails.cache Rails.cache = ActiveSupport::Cache::MemoryStore.new |