From 346ef5b3b271c7d258eaaa20e8fe3ca7de912088 Mon Sep 17 00:00:00 2001 From: Martin Gruner Date: Fri, 1 Apr 2022 10:53:08 +0200 Subject: [PATCH] Maintenance: Disable WebMock in Capybara to solve Net::OpenTimeout issues. (cherry picked from commit 69067529f7e8f98b22091bf5942bf305108fa3f5) --- spec/support/capybara/driven_by.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/spec/support/capybara/driven_by.rb b/spec/support/capybara/driven_by.rb index dc1cadcad..9265b53b6 100644 --- a/spec/support/capybara/driven_by.rb +++ b/spec/support/capybara/driven_by.rb @@ -50,4 +50,12 @@ RSpec.configure do |config| end end + config.around(:each, type: :system) do |example| + # WebMock makes it impossible to have persistent http connections to Selenium, + # which may cause overhead and Net::OpenTimeout errors. + WebMock.disable! + example.run + WebMock.enable! + end + end