aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-07-04 16:42:10 +0200
committerGitHub <noreply@github.com>2019-07-04 16:42:10 +0200
commit68c594b10c8cad14ad2eabfe57c501fe359734f4 (patch)
tree05485b14f2018e5d1adc575c3b6030223668e9dd
parent0c639e8777c2e244b8e91c445edb4d75e1bf8909 (diff)
downloadrneovim-68c594b10c8cad14ad2eabfe57c501fe359734f4.tar.gz
rneovim-68c594b10c8cad14ad2eabfe57c501fe359734f4.tar.bz2
rneovim-68c594b10c8cad14ad2eabfe57c501fe359734f4.zip
tests: loop_spec: retry (#10413)
Flaky test (osx): [ FAILED ] ...is/build/neovim/neovim/test/functional/lua/loop_spec.lua @ 23: vim.loop timer ...is/build/neovim/neovim/test/functional/lua/loop_spec.lua:56: Expected objects to be the same. Passed in: (number) 0 Expected: (number) 2 stack traceback: ...is/build/neovim/neovim/test/functional/lua/loop_spec.lua:56: in function <...is/build/neovim/neovim/test/functional/lua/loop_spec.lua:23> It was bumped from sleeping for 20ms to 50ms in d33aaa0f5f already.
-rw-r--r--test/functional/lua/loop_spec.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/functional/lua/loop_spec.lua b/test/functional/lua/loop_spec.lua
index cd3b935e1a..b96214738a 100644
--- a/test/functional/lua/loop_spec.lua
+++ b/test/functional/lua/loop_spec.lua
@@ -10,6 +10,7 @@ local eq = helpers.eq
local eval = helpers.eval
local matches = helpers.matches
local exec_lua = helpers.exec_lua
+local retry = helpers.retry
before_each(clear)
@@ -52,8 +53,10 @@ describe('vim.loop', function()
eq(0, meths.get_var('coroutine_cnt'))
exec_lua(code)
- sleep(50)
- eq(2, meths.get_var('coroutine_cnt'))
+ retry(2, nil, function()
+ sleep(50)
+ eq(2, meths.get_var('coroutine_cnt'))
+ end)
eq(3, meths.get_var('coroutine_cnt_1'))
end)