зеркало из https://github.com/github/ruby.git
Show timed out threads
* test/lib/test/unit/assertions.rb (assert_join_threads): kill and show timed out threads.
This commit is contained in:
Родитель
4d650bc257
Коммит
bad66f3e36
|
@ -852,8 +852,15 @@ eom
|
|||
values << th.value
|
||||
rescue Exception
|
||||
errs << [th, $!]
|
||||
th = nil
|
||||
end
|
||||
end
|
||||
values
|
||||
ensure
|
||||
if th&.alive?
|
||||
th.raise(Timeout::Error.new)
|
||||
th.join rescue errs << [th, $!]
|
||||
end
|
||||
if !errs.empty?
|
||||
msg = "exceptions on #{errs.length} threads:\n" +
|
||||
errs.map {|t, err|
|
||||
|
@ -865,7 +872,6 @@ eom
|
|||
end
|
||||
raise MiniTest::Assertion, msg
|
||||
end
|
||||
values
|
||||
end
|
||||
|
||||
class << (AssertFile = Struct.new(:failure_message).new)
|
||||
|
|
Загрузка…
Ссылка в новой задаче