diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-23 05:54:06 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-04-23 05:54:06 +0000 |
commit | 87ca4f3065c76a0994ea13071b9f6641df8c03db (patch) | |
tree | d1f116464c15dcd7a54def1045acac59a40367db /test/ruby | |
parent | 1222560ad17a3502cec5043de2549e8e82031ff3 (diff) |
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
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_io.rb | 5 |
1 files changed, 3 insertions, 2 deletions
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 |