mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add timeout to test_do_reply
20140115
T073301Z.log.html.gz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cfa2a21062
commit
251de3209b
1 changed files with 8 additions and 2 deletions
|
@ -4,7 +4,7 @@ require 'drb/drb'
|
||||||
require 'drb/eq'
|
require 'drb/eq'
|
||||||
require 'rinda/ring'
|
require 'rinda/ring'
|
||||||
require 'rinda/tuplespace'
|
require 'rinda/tuplespace'
|
||||||
|
require 'timeout'
|
||||||
require 'singleton'
|
require 'singleton'
|
||||||
|
|
||||||
module Rinda
|
module Rinda
|
||||||
|
@ -571,7 +571,13 @@ class TestRingServer < Test::Unit::TestCase
|
||||||
|
|
||||||
@rs.do_reply
|
@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
|
assert_same @ts, called
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue