Open Schwad opened 6 years ago
Disable rails backtrace cleaner to get the full backtrace and see what causes the error It could be something like the first finished test shutting down some server both tests depend on .. ideally reproduce with a minimal repo to narrow down what causes the error
On Wed, Mar 14, 2018, 09:43 Nick Schwaderer notifications@github.com wrote:
I posted my original query here https://stackoverflow.com/questions/49259181/how-should-i-force-the-parallel-tests-gem-to-wait-for-all-processes-to-finish-in, but this may be a more appropriate place.
I am attempting to get the parallel_tests gem integrated with gitlab-ci for RSpec.
I have followed the instructions on the README for setup, we are testing this out with 2 cores and therefore it is only needing to spin up two testing DB's.
However, it appears when the tests run, I do have two running in parallel, but one finishes before the other and the remainder of the tests instantly fail with the following:
xx) My generic test name Failure/Error: Capybara.reset_sessions!
TypeError: no implicit conversion of String into Integer
./spec/support/capybara.rb:7:in `block (2 levels) in <top (required)>'
Whereas /spec/support/capybara.rb7 is:
config.before(:each) do Capybara.reset_sessions!endThere was guidance on how to make the specs wait for each other, which I implemented as:
at_exit do if ParallelTests.first_process? ParallelTests.wait_for_other_processes_to_finish end end
And when the specs still broke I alternated with .last_process? and even trying to include an elsif statement.
Further, I tried to see implementations of this in the wild on Github and attempted some of those approaches, but still have difficulties.
Unfortunately, it still seems that the processes are not waiting for each other. What have you done in your CI, ideally Gitlab if possible, to ensure that your tests all don't crash after the first process finishes?
Versions: Tested on Ruby 2.4.x and 2.3.x Tested on Rails 5.1.x
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/grosser/parallel_tests/issues/623, or mute the thread https://github.com/notifications/unsubscribe-auth/AAAsZ8gLwluLSM7DF5ZsUimZ3UY8wbUrks5teUiigaJpZM4SqyQ9 .
@Schwad - were you able to figure this out?
I'm trying to not get these weird race conditions when it comes to the stdout during the specs executions from the different processes. Any thoughts / ideas?
I am facing a similar issue. The specs fail with no message after one or more processes finish. No output even with --verbose. No pattern on what specs are running when the other processes are abandoned and considered failures.
maybe add something into each test runner that prints "I'm alive
On Tue, Nov 12, 2019 at 2:57 PM talalatpixlee notifications@github.com wrote:
I am facing a similar issue. The specs fail with no message after one or more processes finish. No output even with --verbose.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/grosser/parallel_tests/issues/623?email_source=notifications&email_token=AAACYZ5IXQCKTOVIPJCUHITQTMYD7A5CNFSM4EVLEQ62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOED4HZRA#issuecomment-553155780, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACYZ2GD7KB4LKU6LIRZ3TQTMYD7ANCNFSM4EVLEQ6Q .
I added the print statement. Seems like one of the thread dies at some point. I can't seem to understand why yet though. The exit code in the results array at the end is nil. Trying to understand if the CI is OOM killing or it is something else.
Puffing Billy was erroring out. https://github.com/eventmachine/eventmachine/issues/366
Separating out the cert and cache paths as mentioned here resolved the issue. https://github.com/oesmith/puffing-billy#in-rspec
@talalatpixlee How did you nail down what was failing? I'm having a similar issue, but not using puffing billy
I posted my original query here, but this may be a more appropriate place.
I am attempting to get the parallel_tests gem integrated with gitlab-ci for RSpec.
I have followed the instructions on the README for setup, we are testing this out with 2 cores and therefore it is only needing to spin up two testing DB's.
However, it appears when the tests run, I do have two running in parallel, but one finishes before the other and the remainder of the tests instantly fail with the following:
Whereas /spec/support/capybara.rb7 is:
There was guidance on how to make the specs wait for each other, which I implemented as:
And when the specs still broke I alternated with .last_process? and even trying to include an elsif statement.
Further, I tried to see implementations of this in the wild on Github and attempted some of those approaches, but still have difficulties.
Unfortunately, it still seems that the processes are not waiting for each other. What have you done in your CI, ideally Gitlab if possible, to ensure that your tests all don't crash after the first process finishes?
Versions: Tested on Ruby 2.4.x and 2.3.x Tested on Rails 5.1.x