mirror of
https://github.com/neovim/neovim.git
synced 2025-09-23 19:48:32 +00:00
test(ui/messages2_spec): close unfinished timers at end of test (#35817)
The vim._extui.messages module uses multiple timers that last 2 or 4 seconds. If these timers aren't finished when a test ends, there will be a 2-second delay on exit with ASAN or TSAN.
This commit is contained in:
@@ -17,6 +17,17 @@ describe('messages2', function()
|
||||
require('vim._extui').enable({})
|
||||
end)
|
||||
end)
|
||||
after_each(function()
|
||||
-- Since vim._extui lasts until Nvim exits, there may be unfinished timers.
|
||||
-- Close unfinished timers to avoid 2s delay on exit with ASAN or TSAN.
|
||||
exec_lua(function()
|
||||
vim.uv.walk(function(handle)
|
||||
if not handle:is_closing() then
|
||||
handle:close()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
it('multiline messages and pager', function()
|
||||
command('echo "foo\nbar"')
|
||||
|
Reference in New Issue
Block a user