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

ruby-changes:38570

From: nobu <ko1@a...>
Date: Wed, 27 May 2015 19:56:49 +0900 (JST)
Subject: [ruby-changes:38570] nobu:r50651 (trunk): test_bigdecimal.rb: adjust

nobu	2015-05-27 19:56:33 +0900 (Wed, 27 May 2015)

  New Revision: 50651

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

  Log:
    test_bigdecimal.rb: adjust
    
    * test/bigdecimal/test_bigdecimal.rb (assert_no_memory_leak): fix
      GC scope and adjust limits.

  Modified files:
    trunk/test/bigdecimal/test_bigdecimal.rb
Index: test/bigdecimal/test_bigdecimal.rb
===================================================================
--- test/bigdecimal/test_bigdecimal.rb	(revision 50650)
+++ test/bigdecimal/test_bigdecimal.rb	(revision 50651)
@@ -1554,11 +1554,11 @@ class TestBigDecimal < Test::Unit::TestC https://github.com/ruby/ruby/blob/trunk/test/bigdecimal/test_bigdecimal.rb#L1554
   end
 
   def assert_no_memory_leak(code, *rest, **opt)
-    code = "5.times {1_000.times {begin #{code}; rescue NoMemoryError; end; GC.start}} if b"
+    code = "8.times {20_000.times {begin #{code}; rescue NoMemoryError; end}; GC.start}"
     super(["-rbigdecimal"],
           "b = BigDecimal('10'); b.nil?; " \
           "GC.add_stress_to_class(BigDecimal); "\
-          "#{code}", code, *rest, rss: true, **opt)
+          "#{code}", code, *rest, rss: true, limit: 1.1, **opt)
   end
 
   if EnvUtil.gc_stress_to_class?

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

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