From e1d63c180cc38cec5a8bf3e543bfe18472352da4 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sun, 22 Dec 2019 11:23:39 +0100 Subject: tests: ex_terminal_spec: retry ":terminal (with fake shell)" (#11588) Flaky failure (Travis CI, macOS): [ RUN ] :terminal (with fake shell) works with gf: 10518.41 ms FAIL test/functional/terminal/ex_terminal_spec.lua:248: Row 1 did not match. Expected: |*^ready $ echo "scripts/shadacat.py" | |* | |*[Process exited 0] | |:terminal echo "scripts/shadacat.py" | Actual: |*^ | |*[Process exited 0] | |* | |:terminal echo "scripts/shadacat.py" | To print the expect() call that would assert the current screen state, use screen:snapshot_util(). In case of non-deterministic failures, use screen:redraw_debug() to show all intermediate screen states. stack traceback: test/functional/ui/screen.lua:579: in function '_wait' test/functional/ui/screen.lua:361: in function 'expect' test/functional/terminal/ex_terminal_spec.lua:248: in function --- test/functional/terminal/ex_terminal_spec.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/functional/terminal/ex_terminal_spec.lua') diff --git a/test/functional/terminal/ex_terminal_spec.lua b/test/functional/terminal/ex_terminal_spec.lua index b0019d2d37..138befd978 100644 --- a/test/functional/terminal/ex_terminal_spec.lua +++ b/test/functional/terminal/ex_terminal_spec.lua @@ -245,12 +245,14 @@ describe(':terminal (with fake shell)', function() it('works with gf', function() command('set shellxquote=') -- win: avoid extra quotes terminal_with_fake_shell([[echo "scripts/shadacat.py"]]) + retry(nil, 4 * screen.timeout, function() screen:expect([[ ^ready $ echo "scripts/shadacat.py" | | [Process exited 0] | :terminal echo "scripts/shadacat.py" | ]]) + end) feed([[]]) eq('term://', string.match(eval('bufname("%")'), "^term://")) feed([[ggf"lgf]]) -- cgit