mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
test_io.rb: avoid OOM
* test/ruby/test_io.rb (TestIO#test_copy_stream_socket7): reduce memory usage so the worker process will not die by OOM. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f1b696480a
commit
25205cf8cd
1 changed files with 2 additions and 1 deletions
|
@ -869,7 +869,8 @@ class TestIO < Test::Unit::TestCase
|
||||||
s1.close
|
s1.close
|
||||||
IO.select([s2])
|
IO.select([s2])
|
||||||
Process.kill(:USR1, Process.ppid)
|
Process.kill(:USR1, Process.ppid)
|
||||||
s2.read
|
buf = String.new(capacity: 16384)
|
||||||
|
nil while s2.read(16384, buf)
|
||||||
end
|
end
|
||||||
s2.close
|
s2.close
|
||||||
nr.times do
|
nr.times do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue