Fix CI error with minitest 5.14

Follow up to 2bf1c17c20, which still left
this one failure. Minitest 5.14 uses error instead of exception, so
exception had been changed to just be the same UnexpectedError instance
and losing us the actual error message.

This also switches to initializing a new UnexpectedError instance
because previously, for reasons I can't quite figure out, reusing the
same instance would still give us a DRbConnError.
This commit is contained in:
John Hawthorn 2020-01-13 11:26:42 -08:00
parent 8c71793b3b
commit 268a099b1b
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