diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-19 14:50:55 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-19 14:50:55 +0000 |
commit | aa252b8c5512db28534d8dd45492bd48851ba3c1 (patch) | |
tree | dc46e36dce822506d440848d11530a742d958dcb /test/ruby | |
parent | 63aaa3c8b22639ca6755ce341bc9408c33ca642d (diff) | |
download | ruby-aa252b8c5512db28534d8dd45492bd48851ba3c1.tar.gz |
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
Diffstat (limited to 'test/ruby')
-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 95c62874a6..877f95658d 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -869,7 +869,8 @@ class TestIO < Test::Unit::TestCase s1.close IO.select([s2]) Process.kill(:USR1, Process.ppid) - s2.read + buf = String.new(capacity: 16384) + nil while s2.read(16384, buf) end s2.close nr.times do |