From 5e792ca0b2b54cc823612a304c856135b08c2b54 Mon Sep 17 00:00:00 2001 From: Mac Siri Date: Mon, 13 Feb 2023 09:51:37 -0500 Subject: [PATCH] Enable rspec-retry on system and request specs (#19103) --- spec/rails_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 80c5056c2..a15ec155a 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -146,10 +146,20 @@ RSpec.configure do |config| allow(FeatureFlag).to receive(:enabled?).with(:connect).and_return(true) end + config.verbose_retry = true + config.around(:each, :flaky) do |ex| ex.run_with_retry retry: 3 end + config.around(:each, type: :request) do |ex| + ex.run_with_retry retry: 3 + end + + config.around(:each, type: :system) do |ex| + ex.run_with_retry retry: 3 + end + config.around(:each, throttle: true) do |example| Rack::Attack.enabled = true example.run