From 25205cf8cd677865fd19ae0700ce4a17bc5534af Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 19 Jan 2018 14:50:55 +0000 Subject: 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 --- test/ruby/test_io.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/ruby') 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 -- cgit v1.2.3