diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-11-21 15:14:51 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-11-21 15:14:51 +0100 |
commit | 550586015232ecc4f68b3479fa8ba2cf81c76e7b (patch) | |
tree | e24c9cc4528b014ddee8b9358d8ed4365681511a /src/testdir/runtest.vim | |
parent | ff5467965e3871d3dc0288416fcc6b1e2ba4f822 (diff) |
patch 8.0.1329: when a flaky test fails it also often fails the second timev8.0.1329
Problem: When a flaky test fails it also often fails the second time.
Solution: Sleep a couple of seconds before the second try.
Diffstat (limited to 'src/testdir/runtest.vim')
-rw-r--r-- | src/testdir/runtest.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/runtest.vim b/src/testdir/runtest.vim index 8eef1669fd..c953d6d7ce 100644 --- a/src/testdir/runtest.vim +++ b/src/testdir/runtest.vim @@ -286,6 +286,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 |