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

ruby-changes:35239

From: nobu <ko1@a...>
Date: Sat, 30 Aug 2014 15:19:03 +0900 (JST)
Subject: [ruby-changes:35239] nobu:r47321 (trunk): test_benchmark.rb: extend sleep time

nobu	2014-08-30 15:18:57 +0900 (Sat, 30 Aug 2014)

  New Revision: 47321

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

  Log:
    test_benchmark.rb: extend sleep time
    
    * test/benchmark/test_benchmark.rb: extend sleep time, as 1ms is
      too short on some environments.

  Modified files:
    trunk/test/benchmark/test_benchmark.rb
Index: test/benchmark/test_benchmark.rb
===================================================================
--- test/benchmark/test_benchmark.rb	(revision 47320)
+++ test/benchmark/test_benchmark.rb	(revision 47321)
@@ -154,7 +154,8 @@ BENCH https://github.com/ruby/ruby/blob/trunk/test/benchmark/test_benchmark.rb#L154
   end
 
   def test_realtime_output
-    realtime = Benchmark.realtime { sleep 0.001 }
-    assert_in_delta 0.001, realtime
+    sleeptime = 1.0
+    realtime = Benchmark.realtime { sleep sleeptime }
+    assert_in_delta sleeptime, realtime
   end
 end

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

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