1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

test_require.rb: reduce GC

* test/ruby/test_require.rb (test_loading_fifo_fd_leak): invoke GC
  only when FDs exhausted to reduce the test time.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2016-10-21 02:38:04 +00:00
parent 81e687d285
commit 0ce605225f

View file

@ -769,9 +769,13 @@ class TestRequire < Test::Unit::TestCase
100.times do |i|
Thread.start {begin sleep(0.001) end until th.stop?; th.raise(IOError)}
assert_raise(IOError, "\#{i} time") do
begin
tap {tap {tap {load(ARGV[0])}}}
end
rescue LoadError
GC.start
retry
end
end
end
end;
}