summaryrefslogtreecommitdiff
path: root/test/rinda
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-15 23:18:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-15 23:18:59 +0000
commit460f55945a9278a6099bd3bd5dc06aa7b8fab6cd (patch)
treefa2b8e7fdd8a1c0c1e262dd954e1629bac94c267 /test/rinda
parent2e8cb7e5d36fcc0df9ac083698b985901ea0041e (diff)
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
Diffstat (limited to 'test/rinda')
-rw-r--r--test/rinda/test_rinda.rb7
1 files changed, 7 insertions, 0 deletions
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