ruby-changes:61938
From: Takashi <ko1@a...>
Date: Fri, 26 Jun 2020 14:12:25 +0900 (JST)
Subject: [ruby-changes:61938] 5c03e4680e (master): Try increasing read timeout of rinda tests
https://git.ruby-lang.org/ruby.git/commit/?id=5c03e4680e From 5c03e4680e724faeedb2c5fc1581d5fcb66aaff2 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Thu, 25 Jun 2020 22:11:40 -0700 Subject: 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 diff --git a/test/rinda/test_rinda.rb b/test/rinda/test_rinda.rb index 69ac64e..2f441cc 100644 --- a/test/rinda/test_rinda.rb +++ b/test/rinda/test_rinda.rb @@ -382,7 +382,7 @@ module TupleSpaceTestModule https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L382 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 https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L410 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 https://github.com/ruby/ruby/blob/trunk/test/rinda/test_rinda.rb#L469 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 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/