aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShreyansh Chouhan <chouhan.shreyansh2702@gmail.com>2021-09-19 22:20:24 +0530
committerShreyansh Chouhan <chouhan.shreyansh2702@gmail.com>2021-09-20 18:10:40 +0530
commit12bccc7dd19e55068156ec5fb55bbf960ec4aad8 (patch)
tree7f90e4506856bd4084ea3d478ccda4c77bbd25b1
parent73d12a8b711743b1441f4029bee48cbaaf7791ec (diff)
downloadrneovim-12bccc7dd19e55068156ec5fb55bbf960ec4aad8.tar.gz
rneovim-12bccc7dd19e55068156ec5fb55bbf960ec4aad8.tar.bz2
rneovim-12bccc7dd19e55068156ec5fb55bbf960ec4aad8.zip
test: close timers in vim_spec.lua functional test
Close the timer started during tests before closing the session. This fixes the uv_loop_close hangs happening in the functional tests. Signed-off-by: Shreyansh Chouhan <chouhan.shreyansh2702@gmail.com>
-rw-r--r--test/functional/lua/vim_spec.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua
index a066cfbc10..f3d265cb92 100644
--- a/test/functional/lua/vim_spec.lua
+++ b/test/functional/lua/vim_spec.lua
@@ -2026,6 +2026,8 @@ describe('lua stdlib', function()
-- Would wait ten seconds if results blocked.
wait_result = vim.wait(10000, function() return vim.g.timer_result end)
+ timer:close()
+
return {
time = (start_time + 5) > get_time(),
wait_result = wait_result,
@@ -2045,6 +2047,8 @@ describe('lua stdlib', function()
wait_result = vim.wait(300, function() return vim.g.timer_result end, nil, true)
+ timer:close()
+
return {
wait_result = wait_result,
}