Prevent starting multiple Capybara proxy servers
What does this MR do and why?
This code is run every time a new Capybara browser session is started. Running this code multiple times causes subsequent feature specs to slow down considerably.
More detailed explanation in gitlab-org/quality/engineering-productivity/master-broken-incidents#6673 (comment 1936109749)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
bin/rspec spec/features/issues/user_sees_sidebar_updates_in_realtime_spec.rb spec/features/dashboard/todos/todos_spec.rb
The specs run much slower without this fix.
Related to #461108 (closed)
Edited by Heinrich Lee Yu