ruby-changes:60492
From: Takashi <ko1@a...>
Date: Tue, 24 Mar 2020 14:54:33 +0900 (JST)
Subject: [ruby-changes:60492] eff0c5bf2a (master): Try to avoid random failures on clock_getres_spec.rb
https://git.ruby-lang.org/ruby.git/commit/?id=eff0c5bf2a From eff0c5bf2ad47d10a440c5211be5eddb3bbf4028 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun <takashikkbn@g...> Date: Mon, 23 Mar 2020 22:53:53 -0700 Subject: Try to avoid random failures on clock_getres_spec.rb This spec fails too often https://github.com/ruby/ruby/runs/529546249 https://github.com/ruby/ruby/runs/524933256 diff --git a/spec/ruby/core/process/clock_getres_spec.rb b/spec/ruby/core/process/clock_getres_spec.rb index 764b8ff..1d5dd7c 100644 --- a/spec/ruby/core/process/clock_getres_spec.rb +++ b/spec/ruby/core/process/clock_getres_spec.rb @@ -8,7 +8,7 @@ describe "Process.clock_getres" do https://github.com/ruby/ruby/blob/trunk/spec/ruby/core/process/clock_getres_spec.rb#L8 # NOTE: Look at fixtures/clocks.rb for clock and OS-specific exclusions ProcessSpecs.clock_constants_for_resolution_checks.each do |name, value| it "matches the clock in practice for Process::#{name}" do - times = 10_000.times.map { Process.clock_gettime(value, :nanosecond) } + times = 100_000.times.map { Process.clock_gettime(value, :nanosecond) } reported = Process.clock_getres(value, :nanosecond) # The clock should not be more accurate than reported (times should be -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/