aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-10-02 12:11:03 +0800
committerzeertzjq <zeertzjq@outlook.com>2025-10-02 12:18:16 +0800
commitdfd3ac6f48328288eaff37cd4a7ef22c5124231a (patch)
tree1e9069c8dbc9c08a16e890104c40911f1c514194 /runtime/lua
parent9f33b69cfdf330a6c89cd107074e6f28070bdda0 (diff)
downloadrneovim-dfd3ac6f48328288eaff37cd4a7ef22c5124231a.tar.gz
rneovim-dfd3ac6f48328288eaff37cd4a7ef22c5124231a.tar.bz2
rneovim-dfd3ac6f48328288eaff37cd4a7ef22c5124231a.zip
vim-patch:partial:9.1.1110: Vim tests are slow and flaky
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: vim/vim#16615 https://github.com/vim/vim/commit/e70587dbdbb1aba2c3f92490b8f870361d4a4177 Part of shared.vim and test_crash.vim changes only. Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Diffstat (limited to 'runtime/lua')
0 files changed, 0 insertions, 0 deletions