[前][次][番号順一覧][スレッド一覧]

ruby-changes:44389

From: nobu <ko1@a...>
Date: Fri, 21 Oct 2016 11:38:09 +0900 (JST)
Subject: [ruby-changes:44389] nobu:r56462 (trunk): test_require.rb: reduce GC

nobu	2016-10-21 11:38:04 +0900 (Fri, 21 Oct 2016)

  New Revision: 56462

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56462

  Log:
    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.

  Modified files:
    trunk/test/ruby/test_require.rb
Index: test/ruby/test_require.rb
===================================================================
--- test/ruby/test_require.rb	(revision 56461)
+++ test/ruby/test_require.rb	(revision 56462)
@@ -769,9 +769,13 @@ class TestRequire < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_require.rb#L769
         100.times do |i|
           Thread.start {begin sleep(0.001) end until th.stop?; th.raise(IOError)}
           assert_raise(IOError, "\#{i} time") do
-            tap {tap {tap {load(ARGV[0])}}}
+            begin
+              tap {tap {tap {load(ARGV[0])}}}
+            rescue LoadError
+              GC.start
+              retry
+            end
           end
-          GC.start
         end
       end;
     }

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]