mirror of
https://github.com/neovim/neovim.git
synced 2026-07-14 05:10:36 +00:00
Merge #40690 from justinmk/fixci
test: unreliable system_spec, vim_spec, tui_spec
This commit is contained in:
@@ -3297,7 +3297,11 @@ describe('API', function()
|
||||
-- On Windows, even though Nvim TUI handles SIGHUP, it's not possible for the
|
||||
-- parent process to know that, so exit code reflects SIGHUP.
|
||||
expected2.exitcode = (is_os('win') and 129 or 1)
|
||||
eq(expected2, eval('nvim_get_chan_info(&channel)'))
|
||||
local chaninfo2 = eval('nvim_get_chan_info(&channel)')
|
||||
if t.is_asan() and chaninfo2.exitcode == 129 then
|
||||
expected2.exitcode = 129 -- FIXME: SIGHUP sometimes isn't caught with ASAN. 96d6042689064
|
||||
end
|
||||
eq(expected2, chaninfo2)
|
||||
|
||||
-- :terminal with args + stopped process (shell-test).
|
||||
command('enew')
|
||||
|
||||
@@ -4,7 +4,6 @@ local n = require('test.functional.testnvim')()
|
||||
local clear = n.clear
|
||||
local exec_lua = n.exec_lua
|
||||
local eq = t.eq
|
||||
local pcall_err = t.pcall_err
|
||||
|
||||
local function system_sync(cmd, opts)
|
||||
return exec_lua(function()
|
||||
@@ -18,8 +17,13 @@ local function system_sync(cmd, opts)
|
||||
|
||||
local res = obj:wait()
|
||||
|
||||
-- Check the process is no longer running
|
||||
assert(not vim.api.nvim_get_proc(obj.pid), 'process still exists')
|
||||
-- Check the process is no longer running. nvim_get_proc() can lag the exit callback (on Windows)?
|
||||
assert(
|
||||
vim.wait(1000, function()
|
||||
return not vim.api.nvim_get_proc(obj.pid)
|
||||
end),
|
||||
'process still exists'
|
||||
)
|
||||
|
||||
return res
|
||||
end)
|
||||
@@ -40,8 +44,13 @@ local function system_async(cmd, opts)
|
||||
|
||||
assert(ok, 'process did not exit')
|
||||
|
||||
-- Check the process is no longer running
|
||||
assert(not vim.api.nvim_get_proc(obj.pid), 'process still exists')
|
||||
-- Check the process is no longer running. nvim_get_proc() can lag the exit callback (on Windows)?
|
||||
assert(
|
||||
vim.wait(1000, function()
|
||||
return not vim.api.nvim_get_proc(obj.pid)
|
||||
end),
|
||||
'process still exists'
|
||||
)
|
||||
|
||||
return res
|
||||
end)
|
||||
|
||||
@@ -1199,7 +1199,9 @@ describe('TUI', function()
|
||||
|
||||
it("split sequences work within 'ttimeoutlen' time", function()
|
||||
poke_both_eventloop() -- Make sure startup requests have finished.
|
||||
child_session:request('nvim_set_option_value', 'ttimeoutlen', 250, {})
|
||||
-- The split sequences below are always completed, so this timeout never actually fires; it only
|
||||
-- needs to exceed the inter-byte gap, which balloons on slow CI.
|
||||
child_session:request('nvim_set_option_value', 'ttimeoutlen', n.load_adjust(1000), {})
|
||||
feed_data('i')
|
||||
screen:expect([[
|
||||
^ |
|
||||
@@ -1236,7 +1238,11 @@ describe('TUI', function()
|
||||
{5:-- ^X mode (^]^D^E^F^I^K^L^N^O^P^Rs^U^V^Y)} |
|
||||
{5:-- TERMINAL --} |
|
||||
]])
|
||||
-- <Esc> is sent after 'ttimeoutlen' exceeds.
|
||||
|
||||
-- <Esc> is sent after 'ttimeoutlen' exceeds. Use a small value so the sleep below reliably exceeds it.
|
||||
child_session:request('nvim_set_option_value', 'ttimeoutlen', 250, {})
|
||||
poke_both_eventloop()
|
||||
|
||||
feed_data('\027')
|
||||
screen:expect_unchanged(false, 25)
|
||||
vim.uv.sleep(225)
|
||||
|
||||
Reference in New Issue
Block a user