From 6bd80ffc2277eca027075c4f209feb92cf5c501e Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 2 Sep 2014 13:32:59 +0000 Subject: test_io.rb: ignore stream closed IOError * test/ruby/test_io.rb (test_readpartial_locktmp): stream closed IOError while reading is not a matter. [Bug #10193] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_io.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 5f5a21b3cb..95331ba02d 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -2867,15 +2867,19 @@ End Thread.pass until th.stop? buf.replace("") assert_empty(buf, bug6099) - th.join rescue ($@.concat(caller); raise) unless th.alive? + assert_predicate(th, :alive?) w.write(data) Thread.pass while th.alive? - th.join rescue ($@.concat(caller); raise) end assert_equal(data, buf, bug6099) rescue RuntimeError # can't modify string; temporarily locked ensure - th.join if th + if th + begin + th.join + rescue IOError + end + end end def test_advise_pipe -- cgit v1.2.3