comparison src/testdir/runtest.vim @ 12905:30b0d784c870 v8.0.1329

patch 8.0.1329: when a flaky test fails it also often fails the second time commit https://github.com/vim/vim/commit/550586015232ecc4f68b3479fa8ba2cf81c76e7b Author: Bram Moolenaar <Bram@vim.org> Date: Tue Nov 21 15:14:51 2017 +0100 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.
author Christian Brabandt <cb@256bit.org>
date Tue, 21 Nov 2017 15:15:05 +0100
parents 90aaa974594e
children 6cf6138b6484
comparison
equal deleted inserted replaced
12904:14f11273dcb3 12905:30b0d784c870
284 call add(s:messages, 'Found errors in ' . s:test . ':') 284 call add(s:messages, 'Found errors in ' . s:test . ':')
285 call extend(s:messages, v:errors) 285 call extend(s:messages, v:errors)
286 call add(s:messages, 'Flaky test failed, running it again') 286 call add(s:messages, 'Flaky test failed, running it again')
287 let first_run = v:errors 287 let first_run = v:errors
288 288
289 " Flakiness is often caused by the system being very busy. Sleep a couple
290 " of seconds to have a higher chance of succeeding the second time.
291 sleep 2
292
289 let v:errors = [] 293 let v:errors = []
290 call RunTheTest(s:test) 294 call RunTheTest(s:test)
291 if len(v:errors) > 0 295 if len(v:errors) > 0
292 let second_run = v:errors 296 let second_run = v:errors
293 let v:errors = ['First run:'] 297 let v:errors = ['First run:']