mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Try increasing read timeout of rinda tests
To prevent random failure with --jit-wait like http://ci.rvm.jp/results/trunk-mjit-wait@silicon-docker/3026615
This commit is contained in:
parent
8070cb56db
commit
5c03e4680e
1 changed files with 8 additions and 2 deletions
|
@ -382,7 +382,7 @@ module TupleSpaceTestModule
|
|||
template = nil
|
||||
taker = Thread.new do
|
||||
assert_raise(Rinda::RequestCanceledError) do
|
||||
@ts.take([:take, nil], 10) do |t|
|
||||
@ts.take([:take, nil], read_timeout) do |t|
|
||||
template = t
|
||||
Thread.new do
|
||||
template.cancel
|
||||
|
@ -410,7 +410,7 @@ module TupleSpaceTestModule
|
|||
template = nil
|
||||
reader = Thread.new do
|
||||
assert_raise(Rinda::RequestCanceledError) do
|
||||
@ts.read([:take, nil], 10) do |t|
|
||||
@ts.read([:take, nil], read_timeout) do |t|
|
||||
template = t
|
||||
Thread.new do
|
||||
template.cancel
|
||||
|
@ -469,6 +469,12 @@ module TupleSpaceTestModule
|
|||
assert(tuple.expired?)
|
||||
assert(!tuple.alive?)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def read_timeout
|
||||
RubyVM::MJIT.enabled? ? 300 : 10 # for --jit-wait
|
||||
end
|
||||
end
|
||||
|
||||
class TupleSpaceTest < Test::Unit::TestCase
|
||||
|
|
Loading…
Add table
Reference in a new issue