Mercurial > vim
changeset 15371:cda564e7c111 v8.1.0693
patch 8.1.0693: channel test fails sometimes
commit https://github.com/vim/vim/commit/f780b8a1c1aefb0c4b4866e50080594e3f7f16cb
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 5 00:35:22 2019 +0100
patch 8.1.0693: channel test fails sometimes
Problem: Channel test fails sometimes.
Solution: Avoid race condition.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 05 Jan 2019 00:45:05 +0100 |
parents | f307b3bc3764 |
children | a9d7228471c1 |
files | src/testdir/test_channel.vim src/version.c |
diffstat | 2 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_channel.vim +++ b/src/testdir/test_channel.vim @@ -1650,17 +1650,16 @@ func Test_write_to_deleted_buffer() return endif let job = job_start('echo hello', {'out_io': 'buffer', 'out_name': 'test_buffer', 'out_msg': 0}) - call WaitForAssert({-> assert_equal("dead", job_status(job))}) let bufnr = bufnr('test_buffer') - call assert_equal(['hello'], getbufline(bufnr, 1, '$')) + call WaitForAssert({-> assert_equal(['hello'], getbufline(bufnr, 1, '$'))}) call assert_equal('nofile', getbufvar(bufnr, '&buftype')) call assert_equal('hide', getbufvar(bufnr, '&bufhidden')) + bdel test_buffer call assert_equal([], getbufline(bufnr, 1, '$')) let job = job_start('echo hello', {'out_io': 'buffer', 'out_name': 'test_buffer', 'out_msg': 0}) - call WaitForAssert({-> assert_equal("dead", job_status(job))}) - call assert_equal(['hello'], getbufline(bufnr, 1, '$')) + call WaitForAssert({-> assert_equal(['hello'], getbufline(bufnr, 1, '$'))}) call assert_equal('nofile', getbufvar(bufnr, '&buftype')) call assert_equal('hide', getbufvar(bufnr, '&bufhidden'))