Don't parallelize tests running on jruby #13685

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
5 participants
Contributor

gaurish commented Jan 12, 2014

Running tests using Minitest's parallelize_me! leads to the following
error:

ArgumentError: marshal data too short
        load at org/jruby/RubyMarshal.java:150
         run at
/home/travis/build/rails/rails/activesupport/lib/active_support/testing/isolation.rb:82
  _run_suite at
/home/travis/build/rails/rails/vendor/bundle/jruby/1.9/gems/minitest-4.7.5/lib/minitest/unit.rb:933
        each at
/home/travis/build/rails/rails/vendor/bundle/jruby/1.9/gems/minitest-4.7.5/lib/minitest/parallel_each.rb:45
rake aborted!

Full Log here:
https://s3.amazonaws.com/archive.travis-ci.org/jobs/16812844/log.txt

Above Error Occurs in many railties, ap, amo, av when tests are run on jruby. with this patch, atleast the tests would compete & not due due weird threading issues.
#11700

@gaurish gaurish Don't parallelize tests running on jruby
Running tests using Minitest's `parallelize_me!` leads to the following
error:

```ruby

ArgumentError: marshal data too short
        load at org/jruby/RubyMarshal.java:150
         run at
/home/travis/build/rails/rails/activesupport/lib/active_support/testing/isolation.rb:82
  _run_suite at
/home/travis/build/rails/rails/vendor/bundle/jruby/1.9/gems/minitest-4.7.5/lib/minitest/unit.rb:933
        each at
/home/travis/build/rails/rails/vendor/bundle/jruby/1.9/gems/minitest-4.7.5/lib/minitest/parallel_each.rb:45
rake aborted!
```

Above Error Occurs in many railties, ap, amo, av when tests are run on
jruby. with this patch, atleast the tests would run
411cd8a
Contributor

headius commented Jan 12, 2014

Perhaps this is a sign that something multi thread treated needs to be fixed instead? I'd rather see this investigated than ignored.

Contributor

gaurish commented Jan 12, 2014

the error ArgumentError: marshal data too short is seen in multiple tests. I have been able to narrow it down to ActiveSupportive::Testing::Isoloation. Here It could be because of two issues:

So you are right, we should not ignore this but I am not able to isolate the exact cause of error. Suggestions on debugging this further are welcome.

Contributor

bf4 commented Jan 21, 2014

@atambo @wycats @carllerche Any thoughts, since you all wrote a lot of this?

Owner

tenderlove commented Feb 9, 2014

Does this still break? I reworked some of the parallelization stuff in minitest, but I'm not sure if it impacts this.

Contributor

gaurish commented Feb 9, 2014

@tenderlove
I am afraid, yes. still same error. here is the log of latest build from Travis(Please scroll at the end to see error)

https://s3.amazonaws.com/archive.travis-ci.org/jobs/18541461/log.txt

Member

robin850 commented Sep 28, 2014

Hi there,

I take the liberty to give it a close since this issue has been addressed in #15845. The problem was that the code was relying on environment variables (that are global) so there were race conditions running tests in parallel. Kudos to Ben Browning for tracking this down and providing a patch!

Thanks everyone ! :-)

robin850 closed this Sep 28, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment