]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0173: tests: Test_balloon_eval_term_visual is flaky v9.2.0173
authorChristian Brabandt <cb@256bit.org>
Sun, 15 Mar 2026 15:42:34 +0000 (15:42 +0000)
committerChristian Brabandt <cb@256bit.org>
Sun, 15 Mar 2026 15:42:34 +0000 (15:42 +0000)
Problem:  tests: Test_balloon_eval_term_visual is flaky
Solution: Use redraw and WaitForAssert() to make it more reliable

Previously, it failed about 1 out of 4 runs for me, now I got it down to
1 out of 10. It's not perfect, but better than before.

closes: #19692

Signed-off-by: Christian Brabandt <cb@256bit.org>
src/testdir/test_balloon.vim
src/version.c

index 1fe0ae89096514f293315f81f134663326e48a0e..8ff2f263ae16a947a7c1c90cb48658b57c938576 100644 (file)
@@ -53,12 +53,15 @@ func Test_balloon_eval_term_visual()
   " the balloon.
   call writefile(s:common_script + [
        \ 'call test_setmouse(3, 6)',
-       \ 'call feedkeys("3Gevfr\<MouseMove>\<Ignore>", "xt")',
+       \ 'call feedkeys("3Gevfr", "xt")',
+       \ 'redraw!',
+       \ 'call feedkeys("\<MouseMove>\<Ignore>", "xt")',
        \ ], 'XTest_beval_visual', 'D')
 
   " Check that the balloon shows up after a mouse move
   let buf = RunVimInTerminal('-S XTest_beval_visual', {'rows': 10, 'cols': 50})
   call TermWait(buf, 50)
+  call WaitForAssert({-> assert_match('-- VISUAL --', term_getline(buf, 10))})
   call VerifyScreenDump(buf, 'Test_balloon_eval_term_02', {})
 
   " clean up
index bac40781c86e6517776c7be1ec51bb1af0b6cb4e..50f92520a36fcb5d8d292cd4ed7da3e0bad9c196 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    173,
 /**/
     172,
 /**/