mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 11:25:33 +00:00
test(terminal/channel_spec): fix flakiness
(cherry picked from commit 89c0adb252)
This commit is contained in:
committed by
github-actions[bot]
parent
c5edfb16f9
commit
f06daa91ed
@@ -24,6 +24,7 @@ describe('terminal channel is closed and later released if', function()
|
|||||||
-- channel hasn't been released yet
|
-- channel hasn't been released yet
|
||||||
eq("Vim(call):Can't send data to closed stream",
|
eq("Vim(call):Can't send data to closed stream",
|
||||||
pcall_err(command, [[bdelete! | call chansend(id, 'test')]]))
|
pcall_err(command, [[bdelete! | call chansend(id, 'test')]]))
|
||||||
|
feed('<Ignore>') -- add input to separate two RPC requests
|
||||||
-- channel has been released after one main loop iteration
|
-- channel has been released after one main loop iteration
|
||||||
eq(chans - 1, eval('len(nvim_list_chans())'))
|
eq(chans - 1, eval('len(nvim_list_chans())'))
|
||||||
end)
|
end)
|
||||||
@@ -40,6 +41,7 @@ describe('terminal channel is closed and later released if', function()
|
|||||||
feed('i<CR>')
|
feed('i<CR>')
|
||||||
-- need to first process input
|
-- need to first process input
|
||||||
poke_eventloop()
|
poke_eventloop()
|
||||||
|
feed('<Ignore>') -- add input to separate two RPC requests
|
||||||
-- channel has been released after another main loop iteration
|
-- channel has been released after another main loop iteration
|
||||||
eq(chans - 1, eval('len(nvim_list_chans())'))
|
eq(chans - 1, eval('len(nvim_list_chans())'))
|
||||||
end)
|
end)
|
||||||
@@ -55,6 +57,7 @@ describe('terminal channel is closed and later released if', function()
|
|||||||
-- channel still hasn't been released yet
|
-- channel still hasn't been released yet
|
||||||
eq("Vim(call):Can't send data to closed stream",
|
eq("Vim(call):Can't send data to closed stream",
|
||||||
pcall_err(command, [[bdelete | call chansend(id, 'test')]]))
|
pcall_err(command, [[bdelete | call chansend(id, 'test')]]))
|
||||||
|
feed('<Ignore>') -- add input to separate two RPC requests
|
||||||
-- channel has been released after one main loop iteration
|
-- channel has been released after one main loop iteration
|
||||||
eq(chans - 1, eval('len(nvim_list_chans())'))
|
eq(chans - 1, eval('len(nvim_list_chans())'))
|
||||||
end)
|
end)
|
||||||
@@ -72,6 +75,7 @@ describe('terminal channel is closed and later released if', function()
|
|||||||
feed('i<CR>')
|
feed('i<CR>')
|
||||||
-- need to first process input
|
-- need to first process input
|
||||||
poke_eventloop()
|
poke_eventloop()
|
||||||
|
feed('<Ignore>') -- add input to separate two RPC requests
|
||||||
-- channel has been released after another main loop iteration
|
-- channel has been released after another main loop iteration
|
||||||
eq(chans - 1, eval('len(nvim_list_chans())'))
|
eq(chans - 1, eval('len(nvim_list_chans())'))
|
||||||
end)
|
end)
|
||||||
@@ -89,6 +93,7 @@ describe('terminal channel is closed and later released if', function()
|
|||||||
-- channel still hasn't been released yet
|
-- channel still hasn't been released yet
|
||||||
eq("Vim(call):Can't send data to closed stream",
|
eq("Vim(call):Can't send data to closed stream",
|
||||||
pcall_err(command, [[bdelete | call chansend(id, 'test')]]))
|
pcall_err(command, [[bdelete | call chansend(id, 'test')]]))
|
||||||
|
feed('<Ignore>') -- add input to separate two RPC requests
|
||||||
-- channel has been released after one main loop iteration
|
-- channel has been released after one main loop iteration
|
||||||
eq(chans - 1, eval('len(nvim_list_chans())'))
|
eq(chans - 1, eval('len(nvim_list_chans())'))
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user