diff options
author | Lachlan Sylvester <lachlan.sylvester@hypothetical.com.au> | 2018-10-09 18:13:12 +1100 |
---|---|---|
committer | Lachlan Sylvester <lachlan.sylvester@hypothetical.com.au> | 2018-10-09 19:34:08 +1100 |
commit | bb03948945ebc4aabc44a9fa24ac6439e5a115f4 (patch) | |
tree | 48d402e846a1e3e7dbbe817ce2de057e355ebd5a /activesupport/lib/active_support | |
parent | a1ee4a9ff9d4a3cb255365310ead0dc7b739c6be (diff) | |
download | rails-bb03948945ebc4aabc44a9fa24ac6439e5a115f4.tar.gz rails-bb03948945ebc4aabc44a9fa24ac6439e5a115f4.tar.bz2 rails-bb03948945ebc4aabc44a9fa24ac6439e5a115f4.zip |
resque errors caused by Marshal dump failures and wrap exceptions in marshallable DRbRemoteError
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/testing/parallelization.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/testing/parallelization.rb b/activesupport/lib/active_support/testing/parallelization.rb index beeb470659..615fe0238e 100644 --- a/activesupport/lib/active_support/testing/parallelization.rb +++ b/activesupport/lib/active_support/testing/parallelization.rb @@ -78,7 +78,14 @@ module ActiveSupport reporter = job[2] result = Minitest.run_one_method(klass, method) - queue.record(reporter, result) + begin + queue.record(reporter, result) + rescue DRb::DRbConnError + result.failures.each do |failure| + failure.exception = DRb::DRbRemoteError.new(failure.exception) + end + queue.record(reporter, result) + end end ensure run_cleanup(worker) |