patch 8.2.0533: tests using term_wait() can still be flaky
Problem: Tests using term_wait() can still be flaky.
Solution: Increase the wait time when rerunning a test. (James McCoy,
closes #5899) Halve the initial times to make tests run faster
when there is no rerun.
diff --git a/src/testdir/test_matchadd_conceal.vim b/src/testdir/test_matchadd_conceal.vim
index 7c02087..be15464 100644
--- a/src/testdir/test_matchadd_conceal.vim
+++ b/src/testdir/test_matchadd_conceal.vim
@@ -298,14 +298,14 @@
END
call writefile(lines, 'Xcolesearch')
let buf = RunVimInTerminal('Xcolesearch', {})
- call term_wait(buf, 100)
+ call TermWait(buf, 50)
" Jump to something that is beyond the bottom of the window,
" so there's a scroll down.
call term_sendkeys(buf, ":so %\<CR>")
- call term_wait(buf, 100)
+ call TermWait(buf, 50)
call term_sendkeys(buf, "/expr\<CR>")
- call term_wait(buf, 100)
+ call TermWait(buf, 50)
" Are the concealed parts of the current line really hidden?
let cursor_row = term_scrape(buf, '.')->map({_, e -> e.chars})->join('')
@@ -335,7 +335,7 @@
" Horizontal scroll would center the cursor in the screen line, but conceal
" makes it go to screen column 1.
call term_sendkeys(buf, "$")
- call term_wait(buf)
+ call TermWait(buf)
" Are the concealed parts of the current line really hidden?
call WaitForAssert({-> assert_equal('c', term_getline(buf, '.'))})