summaryrefslogtreecommitdiff
path: root/test/fiddle
diff options
context:
space:
mode:
authork0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-13 06:17:57 +0000
committerk0kubun <k0kubun@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-13 06:17:57 +0000
commit5ad8e42bef873c7075d41f21688ebb779537a830 (patch)
treed050999e076d1454cde4f8e6d426e5221b10cf62 /test/fiddle
parentc878cf50305cd1e00242932d55b2141a3b023526 (diff)
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
Diffstat (limited to 'test/fiddle')
-rw-r--r--test/fiddle/test_function.rb2
1 files changed, 1 insertions, 1 deletions
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