Skip to content
This repository has been archived by the owner on Nov 3, 2022. It is now read-only.

Commit

Permalink
Download one copy of Chrome per parallel worker
Browse files Browse the repository at this point in the history
We've started seeing the error

    ChildProcess::LaunchError:
      Text file busy - /root/.webdrivers/chromedriver

Which sounds a lot like
titusfortner/webdrivers#77, but that fix was
applied in 2019 and it solved the issues we had then.  This is a new
occurrence, possibly related to a new version of Chrome (as one came
out recently).

Downloading one copy of chrome for each test runner isn't great, but
it's acceptable if it fixes the issue.
  • Loading branch information
barrucadu committed Sep 29, 2021
1 parent ab634e6 commit 47c25eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
config.add_setting :reload_page_wait_time, default: 60
end

Webdrivers.install_dir = File.expand_path("~/.webdrivers/#{ENV['TEST_ENV_NUMBER']}")

Capybara.register_driver :headless_chrome do |app|
chrome_options = Selenium::WebDriver::Chrome::Options.new
chrome_options.headless!
Expand Down

0 comments on commit 47c25eb

Please sign in to comment.