From 462e14e2792bc225303df6a03f17636e689b0a06 Mon Sep 17 00:00:00 2001 From: Ted Johansson Date: Wed, 28 Dec 2022 10:06:50 +0800 Subject: [PATCH] DEV: Enable concurrent system tests (#19632) Currently the `turbo:spec` task will fail when encountering system tests as Capypara tries to use the same port for each process. This simple change uses the same strategy as for databases, by just incrementing the port number by `TEST_ENV_NUMBER` for each process. --- spec/rails_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index 006b888eeef..10744cdfde1 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -249,7 +249,7 @@ RSpec.configure do |config| Capybara.configure do |capybara_config| capybara_config.server_host = "localhost" - capybara_config.server_port = 31337 + capybara_config.server_port = 31337 + ENV['TEST_ENV_NUMBER'].to_i end chrome_browser_options = Selenium::WebDriver::Chrome::Options.new(