1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
Takashi Kokubun 2020-03-23 22:53:53 -07:00
parent 5c4847f191
commit eff0c5bf2a
No known key found for this signature in database
GPG key ID: 6FFC433B12EE23DD

View file

@ -8,7 +8,7 @@ describe "Process.clock_getres" do
# 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