changeset 28520:2748a023cc37 v8.2.4784

patch 8.2.4784: lamba test with timer is flaky Commit: https://github.com/vim/vim/commit/1693712f0263afb929ebca1159ceb17c1563ee3b Author: Bram Moolenaar <Bram@vim.org> Date: Mon Apr 18 16:14:10 2022 +0100 patch 8.2.4784: lamba test with timer is flaky Problem: Lamba test with timer is flaky. Solution: Adjust sleep time on retry.
author Bram Moolenaar <Bram@vim.org>
date Mon, 18 Apr 2022 17:15:02 +0200
parents d217f46c3815
children 74a4e4c0fc6a
files src/testdir/test_lambda.vim src/version.c
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_lambda.vim
+++ b/src/testdir/test_lambda.vim
@@ -58,6 +58,7 @@ endfunc
 func Test_lambda_vim9cmd_linebreak()
   CheckFeature timers
 
+  let g:test_is_flaky = 1
   let lines =<< trim END
       vim9cmd call timer_start(10, (x) => {
           # comment
@@ -65,7 +66,8 @@ func Test_lambda_vim9cmd_linebreak()
          })
   END
   call v9.CheckScriptSuccess(lines)
-  sleep 50m
+  " sleep longer on a retry
+  exe 'sleep ' .. [20, 100, 500, 500, 500][g:run_nr] .. 'm'
   call assert_equal('done', g:result)
   unlet g:result
 endfunc
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4784,
+/**/
     4783,
 /**/
     4782,