neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit b5e6f44c0820d3785c770ba0f3939c22c8f3f10d
parent 5148c1247e4dffbe59bebb89084a285bb9f50677
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Thu, 18 Sep 2025 08:01:21 +0800

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.
Diffstat:
Mtest/functional/ui/messages2_spec.lua | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/test/functional/ui/messages2_spec.lua b/test/functional/ui/messages2_spec.lua @@ -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"')