forked from aniani/vim
patch 8.1.0693: channel test fails sometimes
Problem: Channel test fails sometimes. Solution: Avoid race condition.
This commit is contained in:
@@ -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'))
|
||||
|
||||
|
@@ -799,6 +799,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
693,
|
||||
/**/
|
||||
692,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user