0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

patch 8.1.1867: still a timer test that is flaky on Mac

Problem:    Still a timer test that is flaky on Mac.
Solution:   Loop with a sleep instead of one fixed sleep.
This commit is contained in:
Bram Moolenaar 2019-08-17 13:18:16 +02:00
parent d5cf89872e
commit 315244d85b
2 changed files with 12 additions and 2 deletions

View File

@ -162,8 +162,16 @@ endfunc
func Test_timer_stop_in_callback()
call assert_equal(0, len(timer_info()))
let g:timer1 = timer_start(10, 'StopTimer1')
sleep 50m
call assert_equal(0, len(timer_info()))
let slept = 0
for i in range(10)
if len(timer_info()) == 0
break
endif
sleep 10m
let slept += 10
endfor
" This should take only 30 msec, but on Mac it's often longer
call assert_inrange(0, 50, slept)
endfunc
func StopTimerAll(timer)

View File

@ -769,6 +769,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1867,
/**/
1866,
/**/