1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
normal 2018-04-23 05:54:06 +00:00
parent 1222560ad1
commit 87ca4f3065

View file

@ -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