mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
This commit is contained in:
parent
dae0f4388e
commit
304b544651
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue