From 460f55945a9278a6099bd3bd5dc06aa7b8fab6cd Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 15 Jan 2014 23:18:59 +0000 Subject: test_rinda.rb: timeout * test/rinda/test_rinda.rb (test_do_reply): stop if blocking including TupleSpace#write and RingServer#do_reply. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44623 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/rinda/test_rinda.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/rinda/test_rinda.rb') diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb index 590037d95f..38909f90df 100644 --- a/test/rinda/test_rinda.rb +++ b/test/rinda/test_rinda.rb @@ -567,6 +567,11 @@ class TestRingServer < Test::Unit::TestCase callback = DRb::DRbObject.new callback + th = Thread.new(Thread.current) do |mth| + sleep 15 + mth.raise unless called + end + @ts.write [:lookup_ring, callback] @rs.do_reply @@ -580,6 +585,8 @@ class TestRingServer < Test::Unit::TestCase end assert_same @ts, called + ensure + th.kill if th end def test_do_reply_local -- cgit v1.2.3