diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2020-06-25 22:11:40 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2020-06-25 22:11:56 -0700 |
commit | 5c03e4680e724faeedb2c5fc1581d5fcb66aaff2 (patch) | |
tree | 975207e9a597509dddb52604d071ab53f1f75675 /test/rinda | |
parent | 8070cb56db18966b7186255d46eef869e7fdd9cb (diff) |
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
Diffstat (limited to 'test/rinda')
-rw-r--r-- | test/rinda/test_rinda.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb index 69ac64eb44..2f441ccd8a 100644 --- a/test/rinda/test_rinda.rb +++ b/test/rinda/test_rinda.rb @@ -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 |