summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-28 19:50:51 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-28 19:50:51 +0100
commit9730f74a0b2acb490943393a203a24ab8fab923a (patch)
tree5803134ce926341866b3f4585b28617e1eaafc6a
parent9bfdba3de39c9d23d0d44c92b8aeb5a133513806 (diff)
downloadvim-git-9730f74a0b2acb490943393a203a24ab8fab923a.tar.gz
patch 7.4.1454v7.4.1454
Problem: The exit callback test is flaky. Solution: Loop to wait for a short time up to a second.
-rw-r--r--src/testdir/test_channel.vim17
-rw-r--r--src/version.c2
2 files changed, 15 insertions, 4 deletions
diff --git a/src/testdir/test_channel.vim b/src/testdir/test_channel.vim
index b214fa988..0fded018a 100644
--- a/src/testdir/test_channel.vim
+++ b/src/testdir/test_channel.vim
@@ -535,14 +535,21 @@ endfunc
func Test_exit_callback()
if has('job')
+ call ch_log('Test_exit_callback()')
call s:run_server('s:test_exit_callback')
- " the job may take a little while to exit
- sleep 50m
+ " wait up to a second for the job to exit
+ for i in range(100)
+ if s:job_exit_ret == 'done'
+ break
+ endif
+ sleep 10m
+ " calling job_status() triggers the callback
+ call job_status(s:exit_job)
+ endfor
- " calling job_status() triggers the callback
- call job_status(s:exit_job)
call assert_equal('done', s:job_exit_ret)
+ unlet s:exit_job
endif
endfunc
@@ -571,3 +578,5 @@ func Test_close_callback()
call s:run_server('s:test_close_callback')
endfunc
+" Uncomment this to see what happens, output is in src/testdir/channellog.
+" call ch_logfile('channellog', 'w')
diff --git a/src/version.c b/src/version.c
index 991af8dbf..2c2147081 100644
--- a/src/version.c
+++ b/src/version.c
@@ -744,6 +744,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1454,
+/**/
1453,
/**/
1452,