-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
parallelization issues #77
Comments
@beauraF When running under parallel_test we're able to solve this by downloading one driver per process....
|
I've just experienced the same problem. We have a Rails app that is started with foreman with web and worker processes. These hit the same empty zip file issue. Some ideas to work around this could be:
|
Rake tasks are a good idea, regardless. I'll see if I can figure out how to add those intelligently. As for collisions, I don't want to have someone running 30 tests in parallel that each download a new driver, regardless of how we would keep them from overwriting each other. I'm thinking maybe we can create a local file and use its timestamp to "lock" new downloads. It's also how I'm planning on implementing #29 so can probably pull double duty. We'll see what we can do. |
just merged #84 which will address the immediate issue if not the underlying problem. |
Awesome. It's a first step. Are you planning a release soon? |
Yes, I'm loading up my old Windows machine to validate everything is working there first. |
Same issue on my side: https://circleci.com/gh/beauraF/doctopod/57 |
Oh, I think I see what is happening. I'll get a point release with the change and we can reevaluate. |
@titusfortner If you need access to my project/my CI to perform tests. No worries, I can provide you an access. |
I just run |
Yeah, I think that's going to need to be the recommended solution, but we'll create some rake tasks in 4.0 to give people the option of doing it from command line instead of forcing everyone to execute it in their code. |
Rake tasks have been merged with #117 |
Thanks for your work on this @titusfortner 👍 |
It wasn't quite clear to me what the fix was, so I'm just adding this here incase others have the same issue. To fix this with, for example, Circle CI, I added a new run task before my system tests run to execute the rake tasks mentioned above to update the drivers. - run:
name: Run tests
environment:
- CIRCLE_TEST_REPORTS: test/reports/test
command: bundle exec rails test
when: always
# This is the new task, run before the system tests execute
- run:
name: Extract browser
command: bundle exec rake webdrivers:chromedriver:update
when: always
- run:
name: Run system tests
environment:
- CIRCLE_TEST_REPORTS: test/reports/system
command: bundle exec rails test:system
when: always
|
I'm still on Rails 5.2.3 using the parallel_tests gem and ran into the same problem. The only fix which worked for me is;
|
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.
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.
@map7 Where did you place this line? Thanks, |
@kevx86 I put it in the specs/rails_helper.rb and set environment variables in my .bashrc/.zshrc file |
Hello,
Wedrivers is having some problems with parallelization. This makes it unusable on Heroku CI and under Rails 6.
One of the threads downloads the driver while the others try to access the resource. Which leads to this error.
These are logs under Rails 6 and Circle CI. But I get the same result on Rails 5.2.3 with Heroku CI.
If you have any idea how we can handle this, I'm ready to work on it.
Thanks! Keep up the good work!
The text was updated successfully, but these errors were encountered: