diff --git a/Gemfile b/Gemfile index e8c19b918b9..72d024641cb 100644 --- a/Gemfile +++ b/Gemfile @@ -113,7 +113,6 @@ end group :test do gem 'axe-core-rspec', '~> 4.2' gem 'bundler-audit', require: false - gem 'capybara-selenium', '>= 0.0.6' gem 'simplecov', '~> 0.21.0', require: false gem 'simplecov-cobertura' gem 'simplecov_json_formatter' diff --git a/Gemfile.lock b/Gemfile.lock index 489960208c7..ddf2cca0e08 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -210,9 +210,6 @@ GEM rack-test (>= 0.6.3) regexp_parser (>= 1.5, < 3.0) xpath (~> 3.2) - capybara-selenium (0.0.6) - capybara - selenium-webdriver cbor (0.5.9.6) childprocess (4.1.0) choice (0.2.0) @@ -742,7 +739,6 @@ DEPENDENCIES browser bullet (~> 7.0) bundler-audit - capybara-selenium (>= 0.0.6) capybara-webmock! connection_pool cssbundling-rails diff --git a/README.md b/README.md index cd8bb6ce0b1..0ef762048cb 100644 --- a/README.md +++ b/README.md @@ -198,11 +198,6 @@ $ bundle install $ yarn install ``` -#### I am receiving errors related to Capybara in feature tests -You may need to install _chromedriver_ or your chromedriver may be the wrong version (`$ which chromedriver && chromedriver --version`). - -chromedriver can be installed using [Homebrew](https://formulae.brew.sh/cask/chromedriver) or [direct download](https://chromedriver.chromium.org/downloads). The version of chromedriver should correspond to the version of Chrome you have installed `(Chrome > About Google Chrome)`; if installing via Homebrew, make sure the versions match up. - #### I am receiving errors when creating the development and test databases If you receive the following error (where _whoami_ == _your username_): @@ -222,12 +217,23 @@ $ createdb `whoami` $ make test_serial ``` -##### Errors related to too many _open files_ +##### Errors related to Capybara in feature tests +You may need to install _chromedriver_ or your chromedriver may be the wrong version (`$ which chromedriver && chromedriver --version`). + +chromedriver can be installed using [Homebrew](https://formulae.brew.sh/cask/chromedriver) or [direct download](https://chromedriver.chromium.org/downloads). The version of chromedriver should correspond to the version of Chrome you have installed `(Chrome > About Google Chrome)`; if installing via Homebrew, make sure the versions match up. After your system recieves an automatic Chrome browser update you may have to upgrade (or reinstall) chromedriver. + +If `chromedriver -v` does not work you may have to [allow it](https://stackoverflow.com/questions/60362018/macos-catalinav-10-15-3-error-chromedriver-cannot-be-opened-because-the-de) with `xattr`. + +##### Errors related to _too many open files_ You may receive connection errors similar to the following: `Failed to open TCP connection to 127.0.0.1:9515 (Too many open files - socket(2) for "127.0.0.1" port 9515)` -Running the following, _prior_ to running tests, may solve the problem: +You are encountering you OS's [limits on allowed file descriptors](https://wilsonmar.github.io/maximum-limits/). Check the limits with both: +* `ulimit -n` +* `launchctl limit maxfiles` + +Try this to increase the user limit: ``` $ ulimit -Sn 65536 && make test ``` @@ -235,3 +241,36 @@ To set this _permanently_, add the following to your `~/.zshrc` or `~/.bash_prof ``` ulimit -Sn 65536 ``` + +If you are running MacOS, you may find it is not taking your revised ulimit seriously. [You must insist.](https://medium.com/mindful-technology/too-many-open-files-limit-ulimit-on-mac-os-x-add0f1bfddde) Run this command to edit a property list file: +``` +sudo nano /Library/LaunchDaemons/limit.maxfiles.plist +``` +Paste the following contents into the text editor: +``` + + + + + Label + limit.maxfiles + ProgramArguments + + launchctl + limit + maxfiles + 524288 + 524288 + + RunAtLoad + + ServiceIPC + + + + +``` +Use Control+X to save the file. + +Restart your Mac to cause the .plist to take effect. Check the limits again and you should see both `ulimit -n` and `launchctl limit maxfiles` return a limit of 524288.