diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2018-11-05 11:27:25 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-05 11:27:25 -0500 |
commit | a8c06c2d7dfa49a9fede1eec65c1058fe0fac82b (patch) | |
tree | 7245531e6b5b3e49d9b459fd747f5b64d18a1084 /activesupport | |
parent | c823f9252be2552c65bb1370ccf42a14de461439 (diff) | |
parent | bb03948945ebc4aabc44a9fa24ac6439e5a115f4 (diff) | |
download | rails-a8c06c2d7dfa49a9fede1eec65c1058fe0fac82b.tar.gz rails-a8c06c2d7dfa49a9fede1eec65c1058fe0fac82b.tar.bz2 rails-a8c06c2d7dfa49a9fede1eec65c1058fe0fac82b.zip |
Merge pull request #34131 from lsylvester/defend-against-unmarshable-exceptions
Fix DRb::DRbServerNotFound errors in parallel tests
Diffstat (limited to 'activesupport')
-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 c03a07873d..9c8dffa9d8 100644 --- a/activesupport/lib/active_support/testing/parallelization.rb +++ b/activesupport/lib/active_support/testing/parallelization.rb @@ -79,7 +79,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) |