зеркало из https://github.com/github/ruby.git
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:
Родитель
8070cb56db
Коммит
5c03e4680e
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче