mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
patch 9.0.1592: not all timer tests are marked as flaky
Problem: Not all timer tests are marked as flaky. Solution: Set the flaky flag for all timer tests. (closes #12355)
This commit is contained in:
parent
c9fbd2560f
commit
29b4c513b1
@ -7,6 +7,11 @@ source screendump.vim
|
|||||||
source shared.vim
|
source shared.vim
|
||||||
source term_util.vim
|
source term_util.vim
|
||||||
|
|
||||||
|
func SetUp()
|
||||||
|
" The tests here use timers, thus are sensitive to timing.
|
||||||
|
let g:test_is_flaky = 1
|
||||||
|
endfunc
|
||||||
|
|
||||||
func MyHandler(timer)
|
func MyHandler(timer)
|
||||||
let g:val += 1
|
let g:val += 1
|
||||||
endfunc
|
endfunc
|
||||||
@ -16,7 +21,6 @@ func MyHandlerWithLists(lists, timer)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_timer_oneshot()
|
func Test_timer_oneshot()
|
||||||
let g:test_is_flaky = 1
|
|
||||||
let g:val = 0
|
let g:val = 0
|
||||||
let timer = timer_start(50, 'MyHandler')
|
let timer = timer_start(50, 'MyHandler')
|
||||||
let slept = WaitFor('g:val == 1')
|
let slept = WaitFor('g:val == 1')
|
||||||
@ -35,7 +39,6 @@ func Test_timer_oneshot()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_timer_repeat_three()
|
func Test_timer_repeat_three()
|
||||||
let g:test_is_flaky = 1
|
|
||||||
let g:val = 0
|
let g:val = 0
|
||||||
let timer = timer_start(50, 'MyHandler', {'repeat': 3})
|
let timer = timer_start(50, 'MyHandler', {'repeat': 3})
|
||||||
let slept = WaitFor('g:val == 3')
|
let slept = WaitFor('g:val == 3')
|
||||||
@ -53,7 +56,6 @@ func Test_timer_repeat_three()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_timer_repeat_many()
|
func Test_timer_repeat_many()
|
||||||
let g:test_is_flaky = 1
|
|
||||||
let g:val = 0
|
let g:val = 0
|
||||||
let timer = timer_start(50, 'MyHandler', {'repeat': -1})
|
let timer = timer_start(50, 'MyHandler', {'repeat': -1})
|
||||||
sleep 200m
|
sleep 200m
|
||||||
@ -67,7 +69,6 @@ func Test_timer_repeat_many()
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_timer_with_partial_callback()
|
func Test_timer_with_partial_callback()
|
||||||
let g:test_is_flaky = 1
|
|
||||||
let g:val = 0
|
let g:val = 0
|
||||||
let meow = {'one': 1}
|
let meow = {'one': 1}
|
||||||
function meow.bite(...)
|
function meow.bite(...)
|
||||||
@ -152,7 +153,6 @@ def Test_timer_stopall_with_popup()
|
|||||||
enddef
|
enddef
|
||||||
|
|
||||||
func Test_timer_paused()
|
func Test_timer_paused()
|
||||||
let g:test_is_flaky = 1
|
|
||||||
let g:val = 0
|
let g:val = 0
|
||||||
|
|
||||||
let id = timer_start(50, 'MyHandler')
|
let id = timer_start(50, 'MyHandler')
|
||||||
@ -212,7 +212,6 @@ func StopTimer2(timer)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_timer_stop_in_callback()
|
func Test_timer_stop_in_callback()
|
||||||
let g:test_is_flaky = 1
|
|
||||||
call assert_equal(1, len(timer_info()))
|
call assert_equal(1, len(timer_info()))
|
||||||
let g:timer1 = timer_start(10, 'StopTimer1')
|
let g:timer1 = timer_start(10, 'StopTimer1')
|
||||||
let slept = 0
|
let slept = 0
|
||||||
@ -236,7 +235,6 @@ func StopTimerAll(timer)
|
|||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_timer_stop_all_in_callback()
|
func Test_timer_stop_all_in_callback()
|
||||||
let g:test_is_flaky = 1
|
|
||||||
" One timer is for TestTimeout()
|
" One timer is for TestTimeout()
|
||||||
call assert_equal(1, len(timer_info()))
|
call assert_equal(1, len(timer_info()))
|
||||||
call timer_start(10, 'StopTimerAll')
|
call timer_start(10, 'StopTimerAll')
|
||||||
|
@ -695,6 +695,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 */
|
||||||
|
/**/
|
||||||
|
1592,
|
||||||
/**/
|
/**/
|
||||||
1591,
|
1591,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user