aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-11-04 13:16:24 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-11-05 00:35:54 +0100
commitde13113dc16e3f3a453e783dc7ea692ac4967231 (patch)
tree1f1964b8ddac4a4d1801758e79cdcae0fbd19d32 /src
parent697176fc3ea968e5914eda0d0a606ade7e6c285e (diff)
downloadrneovim-de13113dc16e3f3a453e783dc7ea692ac4967231.tar.gz
rneovim-de13113dc16e3f3a453e783dc7ea692ac4967231.tar.bz2
rneovim-de13113dc16e3f3a453e783dc7ea692ac4967231.zip
test/timer_spec: relax lower-bound
Test is unreliable on macOS 10.13. The lower-bound isn't central to the purpose of the test, so just relax it. 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. related: #6829
Diffstat (limited to 'src')
-rw-r--r--src/nvim/testdir/test_timers.vim5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_timers.vim b/src/nvim/testdir/test_timers.vim
index da61751bf4..8a3e57bb02 100644
--- a/src/nvim/testdir/test_timers.vim
+++ b/src/nvim/testdir/test_timers.vim
@@ -44,7 +44,7 @@ func Test_repeat_many()
let timer = timer_start(50, 'MyHandler', {'repeat': -1})
sleep 200m
call timer_stop(timer)
- call assert_inrange(2, 4, g:val)
+ call assert_inrange((has('mac') ? 1 : 2), 4, g:val)
endfunc
func Test_with_partial_callback()
@@ -167,6 +167,9 @@ func Test_stop_all_in_callback()
let g:timer1 = timer_start(10, 'StopTimerAll')
let info = timer_info()
call assert_equal(1, len(info))
+ if has('mac')
+ sleep 100m
+ endif
sleep 40m
let info = timer_info()
call assert_equal(0, len(info))