diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-11 10:28:02 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-07-11 10:28:02 +0000 |
commit | 304b544651184cec49af8f450cadce5bcd660922 (patch) | |
tree | 70b7a2774ff89ad89befe906bb892971a9369fc2 /test | |
parent | dae0f4388e875f23a553a14351f6a6e5b2a5dd6d (diff) |
test/ruby/test_io.rb (test_copy_stream_to_duplex_io): join thread
Don't leave runaway threads as it could affect other tests.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 4312d030c1..a6a8e78209 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1188,10 +1188,11 @@ class TestIO < Test::Unit::TestCase def test_copy_stream_to_duplex_io result = IO.pipe {|a,w| - Thread.start {w.puts "yes"; w.close} + th = Thread.start {w.puts "yes"; w.close} IO.popen([EnvUtil.rubybin, '-pe$_="#$.:#$_"'], "r+") {|b| IO.copy_stream(a, b) b.close_write + assert_join_threads([th]) b.read } } |