From 87ca4f3065c76a0994ea13071b9f6641df8c03db Mon Sep 17 00:00:00 2001 From: normal Date: Mon, 23 Apr 2018 05:54:06 +0000 Subject: test/ruby/test_io.rb: add extra Thread#join to delay close Maybe this fixes some CI failures. Also, use different timeouts for each item for hopefully easier diagnosis. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/ruby/test_io.rb') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index fb350b971b..8e2447beeb 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -3769,7 +3769,7 @@ __END__ IO.pipe do |r, w| th = Thread.new { r.sysread(1) } w.write(dot) - assert_same th, th.join(30), '"good" reader timeout' + assert_same th, th.join(15), '"good" reader timeout' assert_equal(dot, th.value) end end @@ -3786,13 +3786,14 @@ __END__ end end Thread.pass until th.stop? + assert_nil th.join(0.001) r.close assert_same th, th.join(30), '"bad" reader timeout' assert_match(/stream closed/, th.value.message) end end sig_wr.write 'done' - assert_same noex, noex.join(30), '"good" writer timeout' + assert_same noex, noex.join(20), '"good" writer timeout' assert_equal 'done', noex.value ,'r63216' end end -- cgit v1.2.3