aboutsummaryrefslogtreecommitdiff
path: root/test/old/testdir/test_timers.vim
diff options
context:
space:
mode:
Diffstat (limited to 'test/old/testdir/test_timers.vim')
-rw-r--r--test/old/testdir/test_timers.vim11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/old/testdir/test_timers.vim b/test/old/testdir/test_timers.vim
index 37226c7efb..42114618fb 100644
--- a/test/old/testdir/test_timers.vim
+++ b/test/old/testdir/test_timers.vim
@@ -21,6 +21,7 @@ func MyHandlerWithLists(lists, timer)
endfunc
func Test_timer_oneshot()
+ let g:test_is_flaky = 1
let g:val = 0
let timer = timer_start(50, 'MyHandler')
let slept = WaitFor('g:val == 1')
@@ -33,6 +34,7 @@ func Test_timer_oneshot()
endfunc
func Test_timer_repeat_three()
+ let g:test_is_flaky = 1
let g:val = 0
let timer = timer_start(50, 'MyHandler', {'repeat': 3})
let slept = WaitFor('g:val == 3')
@@ -45,6 +47,7 @@ func Test_timer_repeat_three()
endfunc
func Test_timer_repeat_many()
+ let g:test_is_flaky = 1
let g:val = 0
let timer = timer_start(50, 'MyHandler', {'repeat': -1})
sleep 200m
@@ -53,6 +56,7 @@ func Test_timer_repeat_many()
endfunc
func Test_timer_with_partial_callback()
+ let g:test_is_flaky = 1
let g:val = 0
let meow = {'one': 1}
function meow.bite(...)
@@ -114,6 +118,7 @@ func Test_timer_stopall()
endfunc
func Test_timer_paused()
+ let g:test_is_flaky = 1
let g:val = 0
let id = timer_start(50, 'MyHandler')
@@ -168,6 +173,7 @@ func StopTimer2(timer)
endfunc
func Test_timer_stop_in_callback()
+ let g:test_is_flaky = 1
call assert_equal(0, len(timer_info()))
let g:timer1 = timer_start(10, 'StopTimer1')
let slept = 0
@@ -187,6 +193,7 @@ func StopTimerAll(timer)
endfunc
func Test_timer_stop_all_in_callback()
+ let g:test_is_flaky = 1
call assert_equal(0, len(timer_info()))
call timer_start(10, 'StopTimerAll')
call assert_equal(1, len(timer_info()))
@@ -386,9 +393,9 @@ func Test_timer_error_in_timer_callback()
call WaitForAssert({-> assert_notequal('', term_getline(buf, 8))})
" GC must not run during timer callback, which can make Vim crash.
- call term_wait(buf, 100)
+ call TermWait(buf, 50)
call term_sendkeys(buf, "\<CR>")
- call term_wait(buf, 100)
+ call TermWait(buf, 50)
call assert_equal('run', job_status(job))
call term_sendkeys(buf, ":qall!\<CR>")