From ebd758f80992df2e20a7c51efadf65222712c597 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Tue, 2 Dec 2025 00:14:09 -0500 Subject: [PATCH] test: unreliable "channel opened, ..., deleted by pressing a key" Problem: Test sometimes fails on macos: test/functional/terminal/channel_spec.lua:96: Expected objects to be the same. Passed in: (number) 3 Expected: (number) 2 Solution: Retry a few times. --- test/functional/terminal/channel_spec.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/functional/terminal/channel_spec.lua b/test/functional/terminal/channel_spec.lua index 935bd974be..140390e41f 100644 --- a/test/functional/terminal/channel_spec.lua +++ b/test/functional/terminal/channel_spec.lua @@ -92,7 +92,9 @@ describe('terminal channel is closed and later released if', function() poke_eventloop() feed('') -- add input to separate two RPC requests -- channel has been released after another main loop iteration - eq(chans - 1, eval('len(nvim_list_chans())')) + t.retry(20, nil, function() + eq(chans - 1, eval('len(nvim_list_chans())')) + end) end) -- This indirectly covers #16264