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:
parent
d5cf89872e
commit
315244d85b
@ -162,8 +162,16 @@ endfunc
|
|||||||
func Test_timer_stop_in_callback()
|
func Test_timer_stop_in_callback()
|
||||||
call assert_equal(0, len(timer_info()))
|
call assert_equal(0, len(timer_info()))
|
||||||
let g:timer1 = timer_start(10, 'StopTimer1')
|
let g:timer1 = timer_start(10, 'StopTimer1')
|
||||||
sleep 50m
|
let slept = 0
|
||||||
call assert_equal(0, len(timer_info()))
|
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
|
endfunc
|
||||||
|
|
||||||
func StopTimerAll(timer)
|
func StopTimerAll(timer)
|
||||||
|
@ -769,6 +769,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1867,
|
||||||
/**/
|
/**/
|
||||||
1866,
|
1866,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user