From 67378bfb5ac41c77ee115745c1badf2e896ecbc6 Mon Sep 17 00:00:00 2001 From: altermo <107814000+altermo@users.noreply.github.com> Date: Sat, 13 Jun 2026 18:49:18 +0200 Subject: [PATCH] test(undotree): flaky tests #40218 Problem: After 400f24739728 the undotree test became flaky. It seems to be caused by some kind of race condition where an entry in the undotree is not added when a change in the buffer happens (adding a bunch of sleep around buffer-change operations seems to fix the issue). Solution: Disable autoread plugin in undotree test. --- test/functional/plugin/undotree_spec.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/functional/plugin/undotree_spec.lua b/test/functional/plugin/undotree_spec.lua index b3d1336d16..c21932e58c 100644 --- a/test/functional/plugin/undotree_spec.lua +++ b/test/functional/plugin/undotree_spec.lua @@ -40,7 +40,14 @@ end describe(':Undotree', function() before_each(function() - clear({ args = { '--clean' } }) + clear({ + args = { + '--clean', + -- autoread plugin causes flaky tests + '--cmd', + 'let g:loaded_autoread=1', + }, + }) exec 'packadd nvim.undotree' end)