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

ruby-changes:60986

From: Yusuke <ko1@a...>
Date: Sun, 3 May 2020 00:23:34 +0900 (JST)
Subject: [ruby-changes:60986] 224f29c8e9 (master): spec/ruby/core/process/clock_getres_spec.rb: lax the resolution limit

https://git.ruby-lang.org/ruby.git/commit/?id=224f29c8e9

From 224f29c8e92094af10bc666c474b81a3545d6adf Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <mame@r...>
Date: Sun, 3 May 2020 00:09:58 +0900
Subject: spec/ruby/core/process/clock_getres_spec.rb: lax the resolution limit

Android is Linux, but the clock resolution is 10 milliseconds.
I think that 1 microsecond is too strict for embedded environment.
This change laxes the limit to 10 milliseconds.

diff --git a/spec/ruby/core/process/clock_getres_spec.rb b/spec/ruby/core/process/clock_getres_spec.rb
index b3fc9a4..85aa2b2 100644
--- a/spec/ruby/core/process/clock_getres_spec.rb
+++ b/spec/ruby/core/process/clock_getres_spec.rb
@@ -20,14 +20,14 @@ describe "Process.clock_getres" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/process/clock_getres_spec.rb#L20
   # These are observed
 
   platform_is :linux, :darwin, :windows do
-    it "with Process::CLOCK_REALTIME reports at least 1 microsecond" do
-      Process.clock_getres(Process::CLOCK_REALTIME, :nanosecond).should <= 1_000
+    it "with Process::CLOCK_REALTIME reports at least 10 millisecond" do
+      Process.clock_getres(Process::CLOCK_REALTIME, :nanosecond).should <= 10_000_000
     end
   end
 
   platform_is :linux, :darwin, :windows do
-    it "with Process::CLOCK_MONOTONIC reports at least 1 microsecond" do
-      Process.clock_getres(Process::CLOCK_MONOTONIC, :nanosecond).should <= 1_000
+    it "with Process::CLOCK_MONOTONIC reports at least 10 millisecond" do
+      Process.clock_getres(Process::CLOCK_MONOTONIC, :nanosecond).should <= 10_000_000
     end
   end
 end
-- 
cgit v0.10.2


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

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