summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_channel.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-11-22 14:24:00 +0100
committerBram Moolenaar <Bram@vim.org>2020-11-22 14:24:00 +0100
commit18dc355395f2eac72ab83d984cacd26ae61c791f (patch)
tree6c1e7d7f7bae004eb34e0cf4251ccb5419bb10d7 /src/testdir/test_channel.vim
parent4b2ce1297e6e991bf6a674f9465d26d28e648de7 (diff)
patch 8.2.2031: some tests fail when run under valgrindv8.2.2031
Problem: Some tests fail when run under valgrind. Solution: Avoid timing problems.
Diffstat (limited to 'src/testdir/test_channel.vim')
-rw-r--r--src/testdir/test_channel.vim15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index 6fa7e3bfdb..90d828bdb3 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -2181,18 +2181,21 @@ func Test_issue_5150()
else
let cmd = 'grep foo'
endif
+
let g:job = job_start(cmd, {})
+ sleep 50m " give the job time to start
call job_stop(g:job)
- sleep 50m
- call assert_equal(-1, job_info(g:job).exitval)
+ call WaitForAssert({-> assert_equal(-1, job_info(g:job).exitval)})
+
let g:job = job_start(cmd, {})
- call job_stop(g:job, 'term')
sleep 50m
- call assert_equal(-1, job_info(g:job).exitval)
+ call job_stop(g:job, 'term')
+ call WaitForAssert({-> assert_equal(-1, job_info(g:job).exitval)})
+
let g:job = job_start(cmd, {})
- call job_stop(g:job, 'kill')
sleep 50m
- call assert_equal(-1, job_info(g:job).exitval)
+ call job_stop(g:job, 'kill')
+ call WaitForAssert({-> assert_equal(-1, job_info(g:job).exitval)})
endfunc
func Test_issue_5485()