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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
ParallelTests module not available when running through parallel_rspec? #772
Comments
Currently waiting to hear about: grosser/parallel_tests#772
it's not intended to be available since it is a CLI runner and does not modify the files under test (it can in theory not even be in the Gemfile of the repo) |
@grosser thanks for the answer! What's the recommended way then to solve things as described in: https://github.com/grosser/parallel_tests#running-things-once ? I guess since it might not even be in the Gemfile all those functions would have to inlined? |
require would work in most cases, |
hmmm no that's wrong ... you want "am I the last process alive" :/ |
@grosser yeah exactly was just typing that up, that's our "do all the last processing and fail if test coverage is too low" step & check :) |
... so maybe use |
@grosser might be a solution. Not sure about the tradeoffs against our current solution of "counting" alive processes. I'll have to think/meditate about this some more. Thanks! As for the question, I'll submit a PR to mention this in the README and then I think this can be closed :) |
sounds similar to counting live processes, the advantage would be that there is no race condition since only 1 process would wait for everyone else to stop |
@grosser Ah right, misunderstood what you meant where the race condition was. Thanks! |
* Highlight availability of ParallelTests module Fixes #772 * Add explicit require as a fix instead
Currently waiting to hear about: grosser/parallel_tests#772
FYI, I'm using ParallelTests with the latest simplecov master and it's working great. Only a single test result output on the last process: Using recorded test runtime
12 processes for 178 specs, ~ 14 specs per process
.........................................................................................................................................................................................................馃晵馃晵馃晵馃晵馃晵...............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................馃晵..............................................................................................................................................................................................................................................................................................馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵馃晵.............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................馃晵............馃晵.........................................................................................................................................................................................................................馃晵馃晵....................................馃晵馃晵..........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................馃晵......................................................................................................................................................................................................................................................................................................................馃晵...........................................................馃晵...馃晵馃晵馃晵......................................馃晵.................................................................馃晵....................................................................................................................馃晵...............................................................................................................................................................................................................................................................................馃晵......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Coverage report generated for (1/12), (10/12), (11/12), (12/12), (2/12), (3/12), (4/12), (5/12), (6/12), (7/12), (8/12), (9/12) to /Users/user/cntral/coverage. 6893 / 11166 LOC (61.73%) covered. |
As we found out ParallelTests isn't necessarily always available. Hence the new require logic. Also added a different mechanism for waiting that should get rid off at least one race condition. I just managed to run the parallel_test tests without fail for 50 times. I had a failure before so we'll see how robust these are on CI. Ref: grosser/parallel_tests#772 (comment) Code probably still needs some work and restructuring as when does "result" get called and the waiting is definitely somewhat flaky.
As we found out ParallelTests isn't necessarily always available. Hence the new require logic. Also added a different mechanism for waiting that should get rid off at least one race condition. I just managed to run the parallel_test tests without fail for 50 times. I had a failure before so we'll see how robust these are on CI. Ref: grosser/parallel_tests#772 (comment) Code probably still needs some work and restructuring as when does "result" get called and the waiting is definitely somewhat flaky.
馃憢
Hi there and thanks a lot for your work making the life of lots of ruby devs better or well... their feedback cycles faster 馃挌
I'm the SimpleCov maintainer and hence need to integrate with ParallelTests quite a bit :)
So far we've used code like this to deal with some of the specifics:
However, debugging a case right now where I run tests via
parallel_rspec
I realize that theParallelTests
module isn't available 馃槺As a bit of illustration this is my test file:
And this is what I get:
I assumed the module would always be available from the README (and so I guess did the original author of that code)
I guess it's more of a question:
Help would be much appreciated, thank you for your great work!
edit: done with the most recent ParallTests version (3.1.0)
The text was updated successfully, but these errors were encountered: