aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/testdir/runtest.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim
index c034ad2810..4b5aae823e 100644
--- a/src/nvim/testdir/runtest.vim
+++ b/src/nvim/testdir/runtest.vim
@@ -250,6 +250,10 @@ for s:test in sort(s:tests)
call add(s:messages, 'Flaky test failed, running it again')
let first_run = v:errors
+ " Flakiness is often caused by the system being very busy. Sleep a couple
+ " of seconds to have a higher chance of succeeding the second time.
+ sleep 2
+
let v:errors = []
call RunTheTest(s:test)
if len(v:errors) > 0