summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-19 14:50:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-19 14:50:55 +0000
commit25205cf8cd677865fd19ae0700ce4a17bc5534af (patch)
treedc46e36dce822506d440848d11530a742d958dcb /test
parentf1b696480a2587d36feb6fbbd83d3af00e38cf07 (diff)
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')
-rw-r--r--test/ruby/test_io.rb3
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