Method: ActiveSupport::Testing::Parallelization::Worker#safe_record

Defined in:
lib/active_support/testing/parallelization/worker.rb

#safe_record(reporter, result) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/active_support/testing/parallelization/worker.rb', line 56

def safe_record(reporter, result)
  add_setup_exception(result) if @setup_exception

  begin
    @queue.record(reporter, result)
  rescue DRb::DRbConnError
    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)
  rescue Interrupt
    @queue.interrupt
    raise
  end

  set_process_title("(idle)")
end