From 44f275d51805f328084559db0c74b95d1517f7c5 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sun, 11 Feb 2018 17:09:26 +0100 Subject: [PATCH] vim-patch:8.0.1329: when a flaky test fails it also often fails the second time Problem: When a flaky test fails it also often fails the second time. Solution: Sleep a couple of seconds before the second try. https://github.com/vim/vim/commit/550586015232ecc4f68b3479fa8ba2cf81c76e7b --- src/nvim/testdir/runtest.vim | 4 ++++ 1 file changed, 4 insertions(+) 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