# HG changeset patch # User Bram Moolenaar # Date 1566041404 -7200 # Node ID 01205ef5646d6a0980e8f18c8550518854918647 # Parent 0ea79ae89615a06bb7f7ab381e93e427dcaa7a64 patch 8.1.1867: still a timer test that is flaky on Mac commit https://github.com/vim/vim/commit/315244d85b9b8faae549b1700e8cc2e45eaa68ea Author: Bram Moolenaar Date: Sat Aug 17 13:18:16 2019 +0200 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. diff --git a/src/testdir/test_timers.vim b/src/testdir/test_timers.vim --- a/src/testdir/test_timers.vim +++ b/src/testdir/test_timers.vim @@ -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) diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -770,6 +770,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1867, +/**/ 1866, /**/ 1865,