aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago de Arruda <tpadilha84@gmail.com>2015-07-07 22:58:32 -0300
committerThiago de Arruda <tpadilha84@gmail.com>2015-07-16 23:08:09 -0300
commite85c9966b8b5011e8eda1aef20d00d74d6eec581 (patch)
treee2379ef3a4b3ae5465f274a215b0b939fc08619b
parentd88c93acf390ea9d5e8674283927cff60fb41e0d (diff)
downloadrneovim-e85c9966b8b5011e8eda1aef20d00d74d6eec581.tar.gz
rneovim-e85c9966b8b5011e8eda1aef20d00d74d6eec581.tar.bz2
rneovim-e85c9966b8b5011e8eda1aef20d00d74d6eec581.zip
test: Increase determinism in screen_basic_spec tests
-rw-r--r--test/functional/ui/screen.lua7
-rw-r--r--test/functional/ui/screen_basic_spec.lua1
2 files changed, 7 insertions, 1 deletions
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index 9635f6119c..60198bb008 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -259,6 +259,13 @@ This is probably due to an indeterminism in the test. Try adding
`wait()` (or even a separate `screen:expect(...)`) at a point of possible
indeterminism, typically in between a `feed()` or `execute()` which is non-
synchronous, and a synchronous api call.
+
+Note that sometimes a `wait` can trigger redraws and consequently generate more
+indeterminism. If adding `wait` calls seems to increase the frequency of these
+messages, try removing every `wait` call in the test.
+
+If everything else fails, use Screen:redraw_debug to help investigate what is
+ causing the problem.
]])
local tb = debug.traceback()
local index = string.find(tb, '\n%s*%[C]')
diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua
index d57c1773b1..472c211ab7 100644
--- a/test/functional/ui/screen_basic_spec.lua
+++ b/test/functional/ui/screen_basic_spec.lua
@@ -488,7 +488,6 @@ describe('Screen', function()
end)
it('has minimum width/height values', function()
- wait()
screen:try_resize(1, 1)
screen:expect([[
-- INS^ERT --|