0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 8.2.4784: lamba test with timer is flaky

Problem:    Lamba test with timer is flaky.
Solution:   Adjust sleep time on retry.
This commit is contained in:
Bram Moolenaar
2022-04-18 16:14:10 +01:00
parent 42ccb8d747
commit 1693712f02
2 changed files with 5 additions and 1 deletions

View File

@@ -58,6 +58,7 @@ endfunc
func Test_lambda_vim9cmd_linebreak() func Test_lambda_vim9cmd_linebreak()
CheckFeature timers CheckFeature timers
let g:test_is_flaky = 1
let lines =<< trim END let lines =<< trim END
vim9cmd call timer_start(10, (x) => { vim9cmd call timer_start(10, (x) => {
# comment # comment
@@ -65,7 +66,8 @@ func Test_lambda_vim9cmd_linebreak()
}) })
END END
call v9.CheckScriptSuccess(lines) 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) call assert_equal('done', g:result)
unlet g:result unlet g:result
endfunc endfunc

View File

@@ -746,6 +746,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 */
/**/
4784,
/**/ /**/
4783, 4783,
/**/ /**/