mirror of
https://github.com/vim/vim
synced 2025-03-16 06:47:52 +01:00
Problem: Vim tests are slow and flaky at the same time due to reliance on timeouts which are unreliable. Solution: improve Vim test performance and reduce flakiness (Yee Cheng Chin) A lot of Vim tests currently rely on waiting a specific amount of time before asserting a condition. This is bad because 1) it is slow, as the timeout is hardcoded, 2) it's unreliable as a resource-starved runner may overshoot the timeout. Also, there are a lot of builtin sleep commands in commonly used utilities like VerifyScreenDump and WaitFor() which leads to a lot of unnecessary idle time. Fix these issues by doing the following: 1. Make utilities like VerifyScreenDump and WaitFor use the lowest wait time possible (1 ms). This essentially turns it into a spin wait. On fast machines, these will finish very quickly. For existing tests that had an implicit reliance on the old timeouts (e.g. VerifyScreenDump had a 50ms wait before), fix the tests to wait that specific amount explicitly. 2. Fix tests that sleep or wait for long amounts of time to instead explicitly use a callback mechanism to be notified when a child terminal job has finished. This allows the test to only take as much time as possible instead of having to hard code an unreliable timeout. With these fixes, tests should 1) completely quickly on fast machines, and 2) on slow machines they will still run to completion albeit slowly. Note that previoulsy both were not true. The hardcoded timeouts meant that on fast machines the tests were mostly idling wasting time, whereas on slow machines, the timeouts often were not generous enough to allow them to run to completion. closes: #16615 Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org> |
||
---|---|---|
.. | ||
autoload | ||
bitmaps | ||
colors | ||
compiler | ||
doc | ||
ftplugin | ||
icons | ||
import/dist | ||
indent | ||
keymap | ||
lang | ||
macros | ||
pack/dist/opt | ||
plugin | ||
spell | ||
syntax | ||
tools | ||
tutor | ||
bugreport.vim | ||
defaults.vim | ||
delmenu.vim | ||
doc.info | ||
evim.vim | ||
filetype.vim | ||
ftoff.vim | ||
ftplugin.vim | ||
ftplugof.vim | ||
gvim.desktop | ||
gvimrc_example.vim | ||
hi16-action-make.png | ||
hi22-action-make.png | ||
icons.info | ||
indent.vim | ||
indoff.vim | ||
macmap.vim | ||
macros.info | ||
makemenu.vim | ||
menu.vim | ||
mswin.vim | ||
optwin.vim | ||
scripts.vim | ||
synmenu.vim | ||
termcap | ||
tools.info | ||
tutor.info | ||
vim.desktop | ||
vim16x16.gif | ||
vim16x16.png | ||
vim16x16.xpm | ||
vim32x32.gif | ||
vim32x32.png | ||
vim32x32.xpm | ||
vim48x48.gif | ||
vim48x48.png | ||
vim48x48.xpm | ||
vimlogo.cdr | ||
vimlogo.eps | ||
vimlogo.gif | ||
vimlogo.pdf | ||
vimlogo.svg | ||
vimlogo.xpm | ||
vimrc_example.vim |