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_messages.vim b/src/testdir/test_messages.vim
index 23e7735..90d0d20 100644
--- a/src/testdir/test_messages.vim
+++ b/src/testdir/test_messages.vim
@@ -114,7 +114,7 @@
let rows = 10
let buf = term_start([GetVimProg(), '--clean', '-S', testfile], {'term_rows': rows})
- call term_wait(buf, 200)
+ call TermWait(buf, 100)
call assert_equal('run', job_status(term_getjob(buf)))
call term_sendkeys(buf, "i")
@@ -143,7 +143,7 @@
let rows = 10
let buf = term_start([GetVimProg(), '--clean', '-S', testfile], {'term_rows': rows})
- call term_wait(buf, 200)
+ call WaitForAssert({-> assert_match('0,0-1\s*All$', term_getline(buf, rows - 1))})
call assert_equal('run', job_status(term_getjob(buf)))
call term_sendkeys(buf, "i")