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

ruby-changes:34514

From: nobu <ko1@a...>
Date: Sat, 28 Jun 2014 14:34:56 +0900 (JST)
Subject: [ruby-changes:34514] nobu:r46595 (trunk): test_env.rb: relax limits

nobu	2014-06-28 14:34:50 +0900 (Sat, 28 Jun 2014)

  New Revision: 46595

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

  Log:
    test_env.rb: relax limits
    
    * test/ruby/test_env.rb (test_memory_leak_{aset,select,shift}):
      increase rehearsals and memory leak limits.

  Modified files:
    trunk/test/ruby/test_env.rb
Index: test/ruby/test_env.rb
===================================================================
--- test/ruby/test_env.rb	(revision 46594)
+++ test/ruby/test_env.rb	(revision 46595)
@@ -511,23 +511,23 @@ class TestEnv < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_env.rb#L511
 
   def test_memory_leak_aset
     bug9977 = '[ruby-dev:48323] [Bug #9977]'
-    assert_no_memory_leak([], <<-'end;', "5_000.times(&doit)", bug9977)
+    assert_no_memory_leak([], <<-'end;', "5_000.times(&doit)", bug9977, limit: 2.0)
       ENV.clear
       k = 'FOO'
       v = (ENV[k] = 'bar'*5000 rescue 'bar'*1500)
       doit = proc {ENV[k] = v}
-      50.times(&doit)
+      500.times(&doit)
     end;
   end
 
   def test_memory_leak_select
     bug9978 = '[ruby-dev:48325] [Bug #9978]'
-    assert_no_memory_leak([], <<-'end;', "5_000.times(&doit)", bug9978)
+    assert_no_memory_leak([], <<-'end;', "5_000.times(&doit)", bug9978, limit: 2.0)
       ENV.clear
       k = 'FOO'
       (ENV[k] = 'bar'*5000 rescue 'bar'*1500)
       doit = proc {ENV.select {break}}
-      50.times(&doit)
+      500.times(&doit)
     end;
   end
 
@@ -540,12 +540,12 @@ class TestEnv < Test::Unit::TestCase https://github.com/ruby/ruby/blob/trunk/test/ruby/test_env.rb#L540
 
   def test_memory_leak_shift
     bug9983 = '[ruby-dev:48332] [Bug #9983]'
-    assert_no_memory_leak([], <<-'end;', "5_000.times(&doit)", bug9983)
+    assert_no_memory_leak([], <<-'end;', "5_000.times(&doit)", bug9983, limit: 2.0)
       ENV.clear
       k = 'FOO'
       v = (ENV[k] = 'bar'*5000 rescue 'bar'*1500)
       doit = proc {ENV[k] = v; ENV.shift}
-      50.times(&doit)
+      500.times(&doit)
     end;
   end
 end

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

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