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
This commit is contained in:
k0kubun 2018-11-13 06:17:57 +00:00
Родитель c878cf5030
Коммит 5ad8e42bef
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -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