diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb index 14fc7ef2cc..1991ab6abf 100644 --- a/test/rinda/test_rinda.rb +++ b/test/rinda/test_rinda.rb @@ -620,6 +620,7 @@ end class TestRingServer < Test::Unit::TestCase def setup + @aoe_back = Thread.abort_on_exception @port = Rinda::Ring_PORT @ts = Rinda::TupleSpace.new @@ -627,6 +628,7 @@ class TestRingServer < Test::Unit::TestCase @server = DRb.start_service("druby://localhost:0") end def teardown + Thread.abort_on_exception = @aoe_back @rs.shutdown # implementation-dependent @ts.instance_eval{ @@ -800,7 +802,12 @@ class TestRingServer < Test::Unit::TestCase tl = nil th = Thread.new(Thread.current) do |mth| sleep n - (tl = Thread.list - tl0).each {|t|t.raise(Timeout::Error)} + puts "...timeout! Show the backtraces of all living threads" + (tl = Thread.list - tl0).each_with_index do |t, i| + puts "Thread #{ i }: #{ t.inspect }", *t.backtrace, "" + t.raise(Timeout::Error) + end + puts "and then raise Timeout::Error to the main thread" mth.raise(Timeout::Error) end tl0 << th