summaryrefslogtreecommitdiff
path: root/test/rinda
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-15 08:26:52 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-01-15 08:26:52 +0000
commit251de3209be1a71efb6a49148997f33360155ef0 (patch)
treec8e110684913795be4b882da69b98aa096237ff7 /test/rinda
parentcfa2a21062c113f40fefe8a31ef72121ec987900 (diff)
add timeout to test_do_reply
http://fb64b.rubyci.org/~chkbuild/ruby-trunk/log/20140115T073301Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rinda')
-rw-r--r--test/rinda/test_rinda.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb
index 448c4fe02fc..e297f403d6e 100644
--- a/test/rinda/test_rinda.rb
+++ b/test/rinda/test_rinda.rb
@@ -4,7 +4,7 @@ require 'drb/drb'
require 'drb/eq'
require 'rinda/ring'
require 'rinda/tuplespace'
-
+require 'timeout'
require 'singleton'
module Rinda
@@ -571,7 +571,13 @@ class TestRingServer < Test::Unit::TestCase
@rs.do_reply
- Thread.pass until called
+ t = 10 + Process.clock_gettime(Process::CLOCK_MONOTONIC, :second)
+ until called
+ if t < Process.clock_gettime(Process::CLOCK_MONOTONIC, :second)
+ flunk "timeout during waiting call"
+ end
+ Thread.pass
+ end
assert_same @ts, called
end