Merge pull request #38227 from jhawthorn/fix_for_mimitest_5_14

Fix CI error with minitest 5.14
This commit is contained in:
John Hawthorn 2020-01-13 12:19:22 -08:00 committed by GitHub
commit f891a8d7d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -101,8 +101,14 @@ module ActiveSupport
begin
queue.record(reporter, result)
rescue DRb::DRbConnError
result.failures.each do |failure|
failure.send(:initialize, DRb::DRbRemoteError.new(failure.exception))
result.failures.map! do |failure|
if failure.respond_to?(:error)
# minitest >5.14.0
error = DRb::DRbRemoteError.new(failure.error)
else
error = DRb::DRbRemoteError.new(failure.exception)
end
Minitest::UnexpectedError.new(error)
end
queue.record(reporter, result)
end