From 50b5fc7545f32ca615662ee502e861f9cee9e214 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Thu, 10 Jun 2021 11:39:05 +0100 Subject: [PATCH] Set Capybara retry count to 3 and remove conditional This is a slippery slope and there's perfectly reasonable arguments against doing this, but on a practical level I think retrying the occasional flaky spec (and adding an extra 10 seconds or so on to the build time) is categorically better than failing the build and having to restart the whole thing (potentially multiple times). --- spec/spec_helper.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 82f2977433..2676a2c1f0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -98,12 +98,10 @@ RSpec.configure do |config| # rspec-rails. config.infer_base_class_for_anonymous_controllers = false - # Retry + # Show retries in test output config.verbose_retry = true - # Try twice (retry once) - config.default_retry_count = 2 - # Only retry when Selenium raises Net::ReadTimeout - config.exceptions_to_retry = [Net::ReadTimeout] + # Set maximum retry count + config.default_retry_count = 3 # Force colored output, whether or not the output is a TTY config.color_mode = :on