From 5ad8e42bef873c7075d41f21688ebb779537a830 Mon Sep 17 00:00:00 2001 From: k0kubun Date: Tue, 13 Nov 2018 06:17:57 +0000 Subject: [PATCH] test_function.rb: loosen delta boundary On osx build https://travis-ci.org/ruby/ruby/jobs/454309945, ``` 1) Failure: Fiddle::TestFunction#test_nogvl_poll [/Users/travis/build/ruby/ruby/test/fiddle/test_function.rb:95]: slept amount of time. Expected |200 - 322| (122) to be <= 100. ``` but it succeeds on my macOS machine as is. So it seems that the boundary is just too strict and prone to random failure by overload. To make osx Travis build usable, let me loosen the delta requirement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/fiddle/test_function.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/fiddle/test_function.rb b/test/fiddle/test_function.rb index 12a6425ff7..c6f78284d5 100644 --- a/test/fiddle/test_function.rb +++ b/test/fiddle/test_function.rb @@ -92,7 +92,7 @@ module Fiddle n1 = f.call(nil, 0, msec) n2 = th.value t1 = Process.clock_gettime(Process::CLOCK_MONOTONIC, :millisecond) - assert_in_delta(msec, t1 - t0, 100, 'slept amount of time') + assert_in_delta(msec, t1 - t0, 150, 'slept amount of time') assert_equal(0, n1, perror("poll(2) in main-thread")) assert_equal(0, n2, perror("poll(2) in sub-thread")) end