diff options
author | Daniel Hahler <git@thequod.de> | 2017-12-29 21:13:21 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-12-30 22:49:50 +0100 |
commit | 46f432074e739a0eca9bb204e9c7769935669dbd (patch) | |
tree | dfe1a7953a75aaf7e0e10dcc1571dcbc15119c33 /test | |
parent | a30242d661b16197328859c50e609862011c9d48 (diff) | |
download | rneovim-46f432074e739a0eca9bb204e9c7769935669dbd.tar.gz rneovim-46f432074e739a0eca9bb204e9c7769935669dbd.tar.bz2 rneovim-46f432074e739a0eca9bb204e9c7769935669dbd.zip |
tests: termclose_spec: fix flaky SIGTERM test #7787
Followup to https://github.com/neovim/neovim/pull/7217.
Build failure: https://travis-ci.org/neovim/neovim/jobs/322930672#L2958.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/autocmd/termclose_spec.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/functional/autocmd/termclose_spec.lua b/test/functional/autocmd/termclose_spec.lua index c6c30494dd..e64df502a6 100644 --- a/test/functional/autocmd/termclose_spec.lua +++ b/test/functional/autocmd/termclose_spec.lua @@ -4,6 +4,7 @@ local clear, command, nvim, nvim_dir = helpers.clear, helpers.command, helpers.nvim, helpers.nvim_dir local eval, eq, retry = helpers.eval, helpers.eq, helpers.retry +local ok = helpers.ok if helpers.pending_win32(pending) then return end @@ -41,7 +42,9 @@ describe('TermClose event', function() command('call jobstop(g:test_job)') retry(nil, nil, function() eq(1, eval('get(g:, "test_job_exited", 0)')) end) local duration = os.time() - start - eq(2, duration) + -- nvim starts sending SIGTERM after KILL_TIMEOUT_MS + ok(duration >= 2) + ok(duration <= 4) -- <= 2 + delta because of slow CI end) it('kills pty job trapping SIGHUP and SIGTERM', function() @@ -58,8 +61,8 @@ describe('TermClose event', function() retry(nil, nil, function() eq(1, eval('get(g:, "test_job_exited", 0)')) end) local duration = os.time() - start -- nvim starts sending kill after 2*KILL_TIMEOUT_MS - helpers.ok(4 <= duration) - helpers.ok(duration <= 7) -- <= 4 + delta because of slow CI + ok(duration >= 4) + ok(duration <= 7) -- <= 4 + delta because of slow CI end) it('reports the correct <abuf>', function() |