Commit cd9fb6e7 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Avoid retrying controller tests due to data not being reset

parent 20a19ef2
......@@ -197,6 +197,14 @@ RSpec.configure do |config|
if ENV['CI'] || ENV['RETRIES']
# This includes the first try, i.e. tests will be run 4 times before failing.
config.default_retry_count = ENV.fetch('RETRIES', 3).to_i + 1
# Do not retry controller tests because rspec-retry cannot properly
# reset the controller which may contain data from last attempt. See
# https://gitlab.com/gitlab-org/gitlab/-/merge_requests/73360
config.around(:each, type: :controller) do |example|
example.run_with_retry(retry: 1)
end
config.exceptions_to_hard_fail = [DeprecationToolkitEnv::DeprecationBehaviors::SelectiveRaise::RaiseDisallowedDeprecation]
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment