aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/timer_spec.lua
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 /test/functional/eval/timer_spec.lua
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 'test/functional/eval/timer_spec.lua')
-rw-r--r--test/functional/eval/timer_spec.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/eval/timer_spec.lua b/test/functional/eval/timer_spec.lua
index c945f12e0e..d6fba112f1 100644
--- a/test/functional/eval/timer_spec.lua
+++ b/test/functional/eval/timer_spec.lua
@@ -82,7 +82,7 @@ describe('timers', function()
run(nil, nil, nil, 300)
feed("c")
local count = eval("g:val")
- assert(count >= 4, 'expected count >= 4, got: '..tostring(count))
+ assert(count >= 3, 'expected count >= 3, got: '..tostring(count))
eq(99, eval("g:c"))
end)
@@ -144,8 +144,8 @@ describe('timers', function()
local count2 = eval("g:val")
-- when count is eval:ed after timer_stop this should be non-racy
eq(count, count2)
- assert(4 <= count and count <= 7,
- 'expected (4 <= count <= 7), got: '..tostring(count))
+ assert(3 <= count and count <= 7,
+ 'expected (3 <= count <= 7), got: '..tostring(count))
end)
it('can be stopped from the handler', function()