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:
parent
5c4847f191
commit
eff0c5bf2a
@ -8,7 +8,7 @@ describe "Process.clock_getres" do
|
|||||||
# NOTE: Look at fixtures/clocks.rb for clock and OS-specific exclusions
|
# NOTE: Look at fixtures/clocks.rb for clock and OS-specific exclusions
|
||||||
ProcessSpecs.clock_constants_for_resolution_checks.each do |name, value|
|
ProcessSpecs.clock_constants_for_resolution_checks.each do |name, value|
|
||||||
it "matches the clock in practice for Process::#{name}" do
|
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)
|
reported = Process.clock_getres(value, :nanosecond)
|
||||||
|
|
||||||
# The clock should not be more accurate than reported (times should be
|
# The clock should not be more accurate than reported (times should be
|
||||||
|
Loading…
x
Reference in New Issue
Block a user