mirror of
https://github.com/discourse/discourse.git
synced 2025-02-09 21:04:48 +00:00
What is the problem here? The `selenium-webdriver` gem is responsible for downloading the right version of the `chromedriver` binary and it downloads it into the `~/.cache/selenium` folder. THe problem here is that when a user runs `bin/turbo_rspec spec/system` for the first time, all of the processes will try to download the `chromedriver` binary to the same path at the same time and will lead to concurrency errors. What is the fix here? Before running any RSpec suite, we first check if the `.cache/selenium` folder is present. If it is not present, we use a file system lock to download the `chromedriver` binary such that other processes that runs after will not need to install the `chromedriver` binary. The long term fix here is to get `selenium-manager` to download the `chromedriver` binary to a unique path for each process but the `--cache-path` option for `selenium-manager` is currently not supported in `selenium-webdriver`.