diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-27 09:28:08 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-27 09:28:08 +0000 |
commit | 7a5d45fc3c0fd7644a6025367f299ee344e62ee7 (patch) | |
tree | 2d9b7edf955facc6d78034278bd41850ca9af219 /test/ruby | |
parent | 1503e320d9ab33da37f79242fa30b780bd8835d5 (diff) | |
download | ruby-7a5d45fc3c0fd7644a6025367f299ee344e62ee7.tar.gz |
* test/ruby/test_io.rb (TestIO#pipe): should close write end of pipe
before closing read end, to get rid of timing problem.
* test/ruby/test_io_m17n.rb (TestIO_M17N#pipe): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29611 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_io.rb | 8 | ||||
-rw-r--r-- | test/ruby/test_io_m17n.rb | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index b692c91c7b..af7f428ec4 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -41,14 +41,14 @@ class TestIO < Test::Unit::TestCase we = $! end end - flunk("timeout") unless rt.join(10) && wt.join(10) + flunk("timeout") unless wt.join(10) && rt.join(10) ensure - r.close unless !r || r.closed? w.close unless !w || w.closed? - (rt.kill; rt.join) if rt + r.close unless !r || r.closed? (wt.kill; wt.join) if wt - raise re if re + (rt.kill; rt.join) if rt raise we if we + raise re if re end def with_pipe diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index 8f2bd6feea..0ae8c793b0 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -38,14 +38,14 @@ class TestIO_M17N < Test::Unit::TestCase we = $! end end - flunk("timeout") unless rt.join(10) && wt.join(10) + flunk("timeout") unless wt.join(10) && rt.join(10) ensure - r.close unless !r || r.closed? w.close unless !w || w.closed? - (rt.kill; rt.join) if rt + r.close unless !r || r.closed? (wt.kill; wt.join) if wt - raise re if re + (rt.kill; rt.join) if rt raise we if we + raise re if re end def with_pipe(*args) |