summaryrefslogtreecommitdiff
path: root/test/completion
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2018-07-22 22:42:41 +0100
committerw0rp <devw0rp@gmail.com>2018-07-22 22:42:41 +0100
commit3e4db9ed5cfc95ee75a2a7df80b54d075bdc7b00 (patch)
tree09e737812ebc3598a39743dd30e2941c1f594b6c /test/completion
parent0e71e8b46523d08c801b329e37b0ef89afe6ae8f (diff)
downloadale-3e4db9ed5cfc95ee75a2a7df80b54d075bdc7b00.zip
Make the completion events test fail less
Diffstat (limited to 'test/completion')
-rw-r--r--test/completion/test_completion_events.vader12
1 files changed, 10 insertions, 2 deletions
diff --git a/test/completion/test_completion_events.vader b/test/completion/test_completion_events.vader
index f8cf268c..f3e05950 100644
--- a/test/completion/test_completion_events.vader
+++ b/test/completion/test_completion_events.vader
@@ -32,8 +32,16 @@ Before:
endfunction
let g:ale_completion_delay = 0
- call ale#completion#Queue()
- sleep 1m
+
+ " Run this check a few times, as it can fail randomly.
+ for g:i in range(has('nvim-0.3') || has('win32') ? 5 : 1)
+ call ale#completion#Queue()
+ sleep 1m
+
+ if g:get_completions_called is a:expect_success
+ break
+ endif
+ endfor
AssertEqual a:expect_success, g:get_completions_called
endfunction