Patch 7.4.1454
Problem:    The exit callback test is flaky.
Solution:   Loop to wait for a short time up to a second.
Files:      src/testdir/test_channel.vim


*** ../vim-7.4.1453/src/testdir/test_channel.vim        2016-02-27 
21:10:05.121338560 +0100
--- src/testdir/test_channel.vim        2016-02-28 19:48:56.812983833 +0100
***************
*** 535,548 ****
  
  func Test_exit_callback()
    if has('job')
      call s:run_server('s:test_exit_callback')
  
!     " the job may take a little while to exit
!     sleep 50m
  
-     " calling job_status() triggers the callback
-     call job_status(s:exit_job)
      call assert_equal('done', s:job_exit_ret)
    endif
  endfunc
  
--- 535,555 ----
  
  func Test_exit_callback()
    if has('job')
+     call ch_log('Test_exit_callback()')
      call s:run_server('s:test_exit_callback')
  
!     " 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
  
      call assert_equal('done', s:job_exit_ret)
+     unlet s:exit_job
    endif
  endfunc
  
***************
*** 571,573 ****
--- 578,582 ----
    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')
*** ../vim-7.4.1453/src/version.c       2016-02-28 19:39:17.139027266 +0100
--- src/version.c       2016-02-28 19:49:52.568399978 +0100
***************
*** 745,746 ****
--- 745,748 ----
  {   /* Add new patch number below this line */
+ /**/
+     1454,
  /**/

-- 
Did Adam and Eve have navels?

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui