Comments (3)
After several tests, I have noticed that when running rake parallel:spec[1] with a single CPU, it works perfectly. However, if we start increasing the number of CPUs, there are more failed tests, and the number of failures increases as well with the number of CPUs. Therefore, I believe that files are being generated on one CPU and it's trying to read them on a different one, which is unable to access the resource.
from parallel_tests.
you need to configure the activestorage location to be different for each process
please update the wiki if you find a way to do that
from parallel_tests.
My mistake in the carrierwave configuration, before I had this configuration:
- Test.rb
config.cache_store = :file_store, Rails.root.join("tmp", "cache", "paralleltests#{ENV['TEST_ENV_NUMBER']}")
- Carrierwave.rb
klass.class_eval do
def cache_dir
'uploads/spec/tmp'
end
def store_dir
"uploads/spec/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
end
And of course it was saving the cache and the temporary store in one place in carrierwave and in the test environment it was indicating that the cache was in a completely different place.
- Carrierwave.rb
klass.class_eval do
def cache_dir
"/tmp/paralleltests#{ENV['TEST_ENV_NUMBER']}/cache"
end
def store_dir
"/tmp/paralleltests#{ENV['TEST_ENV_NUMBER']}/spec/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
end
And with this it works correctly, sorry. :)
from parallel_tests.
Related Issues (20)
- Stops working with Rails 5.2 starting in v4.5 HOT 2
- parallel_spinach stops working starting in 3.9.0 HOT 2
- Running `rails parallel:spec[4]` does not recognize the CPU count HOT 2
- After updating, throwing "LoadError: cannot load such file -- faraday/follow_redirects (LoadError)" HOT 3
- parallel:rake, "Don't know how to build task..." HOT 14
- [Feature Request] Split tests based on execution time HOT 3
- One of the test processes running forever HOT 4
- Add failure-exit-code option to customize exit code on test failures
- Option --pattern unexpected behavior ? HOT 1
- Restore back `--verbose-rerun-command` HOT 2
- How to prepare multiple databasesyourproject_test<%= ENV['TEST_ENV_NUMBER'] %> in docker ? HOT 1
- Using -o "-p foo_profile" run tests repeatedly HOT 1
- Executing a Single Group in Multiple Processes HOT 1
- Same file running twice
- Parallel execution of rspec is slower than serial HOT 1
- Test Failed Error Message HOT 1
- Invalid Option Error -- tty HOT 1
- Feature request: `--only-group` equivalent for `parallel:setup` HOT 3
- Multi-DB commands parallel:<command>:<database> HOT 1
- better rails engine support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parallel_tests.