From de13113dc16e3f3a453e783dc7ea692ac4967231 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 4 Nov 2018 13:16:24 +0100 Subject: 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 to happen with X=10ms, Y=40ms. related: #6829 --- test/functional/eval/timer_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/eval/timer_spec.lua') 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() -- cgit From f8639dc99cb085432b14da086af316176152bc1f Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 10 Nov 2018 11:12:04 +0100 Subject: test: adjust time-sensitive tests (#9220) - window_split_tab_spec.lua: Put cursor at bottom of :terminal buffer so that it follows output. - inccommand_spec.lua: Increase timeout to allow 2nd retry. - Timer tests are less reliable on Travis CI macOS 10.12/10.13. ref #6829 ref e39dade80b02 ref de13113dc16e 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 to happen with X=10ms, Y=40ms. --- test/functional/eval/timer_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/eval/timer_spec.lua') diff --git a/test/functional/eval/timer_spec.lua b/test/functional/eval/timer_spec.lua index d6fba112f1..124b9625c3 100644 --- a/test/functional/eval/timer_spec.lua +++ b/test/functional/eval/timer_spec.lua @@ -172,8 +172,8 @@ describe('timers', function() let g:val2 += 1 endfunc ]]) - command("call timer_start(50, 'MyHandler', {'repeat': 3})") - command("call timer_start(100, 'MyHandler2', {'repeat': 2})") + command("call timer_start(20, 'MyHandler', {'repeat': 3})") + command("call timer_start(40, 'MyHandler2', {'repeat': 2})") run(nil, nil, nil, 300) eq(3,eval("g:val")) eq(2,eval("g:val2")) -- cgit