mirror of
https://github.com/neovim/neovim.git
synced 2026-08-26 09:01:57 +00:00
test: fix flaky tests in terminal/{buffer,channel}_spec.lua (#37966)
In buffer_spec.lua, wait for a bit more than the refresh delay. In channel_spec.lua, retry sending lines on Windows.
This commit is contained in:
@@ -304,7 +304,7 @@ describe(':terminal buffer', function()
|
||||
screen:expect_unchanged()
|
||||
for i = 1, 10 do
|
||||
eq({ mode = 't', blocking = true }, api.nvim_get_mode())
|
||||
vim.uv.sleep(10) -- Wait for the previously scheduled refresh timer to arrive
|
||||
vim.uv.sleep(15) -- Wait for the previously scheduled refresh timer to arrive
|
||||
feed('j') -- Refresh scheduled for the last 'j' and processed for the one before
|
||||
screen:expect(([[
|
||||
tty ready |
|
||||
@@ -337,7 +337,7 @@ describe(':terminal buffer', function()
|
||||
screen:expect_unchanged()
|
||||
for i = 1, 10 do
|
||||
eq({ mode = 'nt', blocking = true }, api.nvim_get_mode())
|
||||
vim.uv.sleep(10) -- Wait for the previously scheduled refresh timer to arrive
|
||||
vim.uv.sleep(15) -- Wait for the previously scheduled refresh timer to arrive
|
||||
feed('j') -- Refresh scheduled for the last 'j' and processed for the one before
|
||||
screen:expect(([[
|
||||
tty ready |
|
||||
|
||||
Reference in New Issue
Block a user