mirror of
https://github.com/neovim/neovim.git
synced 2026-01-19 11:40:53 +10:00
test/macOS: adjust time-sensitive tests
From test_timers.vim:
Found errors in Test_paused():
First run:
function RunTheTest[35]..Test_paused line 20: Expected range 0 - 100, but got 123
Second run:
function RunTheTest[35]..Test_paused line 20: Expected range 0 - 100, but got 106
previously: #9220
- Timer tests are less reliable on Travis CI macOS 10.12/10.13.
ref #6829
ref e39dade80b
ref de13113dc1
ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452
> We don't guarantee that a X ms timer is triggered during Y ms sleep
> for any X<Y, though I would expect the load to be really bad for this
> to happen with X=10ms, Y=40ms.
This commit is contained in:
@@ -121,7 +121,7 @@ func Test_paused()
|
||||
let slept = WaitFor('g:val == 1')
|
||||
call assert_equal(1, g:val)
|
||||
if has('reltime')
|
||||
call assert_inrange(0, 100, slept)
|
||||
call assert_inrange(0, 140, slept)
|
||||
else
|
||||
call assert_inrange(0, 10, slept)
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user