]> granicus.if.org Git - vim/commitdiff
patch 8.2.3772: timer info test fails on slow machine v8.2.3772
authorBram Moolenaar <Bram@vim.org>
Fri, 10 Dec 2021 10:57:08 +0000 (10:57 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 10 Dec 2021 10:57:08 +0000 (10:57 +0000)
Problem:    Timer info test fails on slow machine.
Solution:   Use WaitForAssert().

src/testdir/test_timers.vim
src/version.c

index c833dd837f667a9a36eae7c9bcddc0db51aca7b9..790b7b0d059d9aa6279633ad82391d820f857065 100644 (file)
@@ -121,8 +121,7 @@ func Test_timer_info()
   " check repeat count inside the callback
   let g:timer_repeat = []
   let tid = timer_start(10, {tid -> execute("call add(g:timer_repeat, timer_info(tid)[0].repeat)")}, #{repeat: 3})
-  sleep 100m
-  call assert_equal([2, 1, 0], g:timer_repeat)
+  call WaitForAssert({-> assert_equal([2, 1, 0], g:timer_repeat)})
   unlet g:timer_repeat
 endfunc
 
index 9b927f292c187b16112f02d3093cdafc7230a884..a598b6b140660f68cdc754a4097b38fa6530393f 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3772,
 /**/
     3771,
 /**/