Show timed out threads
* test/lib/test/unit/assertions.rb (assert_join_threads): kill and show timed out threads.
This commit is contained in:
parent
4d650bc257
commit
bad66f3e36
@ -852,8 +852,15 @@ eom
|
|||||||
values << th.value
|
values << th.value
|
||||||
rescue Exception
|
rescue Exception
|
||||||
errs << [th, $!]
|
errs << [th, $!]
|
||||||
|
th = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
values
|
||||||
|
ensure
|
||||||
|
if th&.alive?
|
||||||
|
th.raise(Timeout::Error.new)
|
||||||
|
th.join rescue errs << [th, $!]
|
||||||
|
end
|
||||||
if !errs.empty?
|
if !errs.empty?
|
||||||
msg = "exceptions on #{errs.length} threads:\n" +
|
msg = "exceptions on #{errs.length} threads:\n" +
|
||||||
errs.map {|t, err|
|
errs.map {|t, err|
|
||||||
@ -865,7 +872,6 @@ eom
|
|||||||
end
|
end
|
||||||
raise MiniTest::Assertion, msg
|
raise MiniTest::Assertion, msg
|
||||||
end
|
end
|
||||||
values
|
|
||||||
end
|
end
|
||||||
|
|
||||||
class << (AssertFile = Struct.new(:failure_message).new)
|
class << (AssertFile = Struct.new(:failure_message).new)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user