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:
@@ -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
|
||||||
|
@@ -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,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user