instance method
shutdown
Ruby on Rails edge
Since v6.1.7.10Signature
shutdown()
No documentation comment.
Source
# File activesupport/lib/active_support/testing/parallelization/server.rb, line 71
def shutdown
# Wait for initial queue to drain
while @distributor.pending?
sleep 0.1
end
@distributor.close
wait_for_active_workers
@in_flight.values.each do |(klass, name, reporter)|
result = Minitest::Result.from(klass.new(name))
error = RuntimeError.new("result not reported")
error.set_backtrace([""])
result.failures << Minitest::UnexpectedError.new(error)
reporter.synchronize do
reporter.record(result)
end
end
rescue Interrupt
warn "Interrupted. Exiting..."
@distributor.close
wait_for_active_workers
end
Defined in activesupport/lib/active_support/testing/parallelization/server.rb line 71
· View on GitHub
· Improve this page
· Find usages on GitHub