aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2018-11-30 05:25:20 +0100
committerJustin M. Keyes <justinkz@gmail.com>2018-11-30 05:25:20 +0100
commitb0ebf61d37ccae3c480834d2ac1b5559e7e3d20d (patch)
tree9a20da1368b65ad6811af4988e6197c7b9f06938
parentbd32d8cf95d019eae90ee9ef500f722955ee9d8a (diff)
downloadrneovim-b0ebf61d37ccae3c480834d2ac1b5559e7e3d20d.tar.gz
rneovim-b0ebf61d37ccae3c480834d2ac1b5559e7e3d20d.tar.bz2
rneovim-b0ebf61d37ccae3c480834d2ac1b5559e7e3d20d.zip
test: adjust time-sensitive tests
From test_alot.vim: Found errors in Test_lambda_with_timer(): First run: function RunTheTest[35]..Test_lambda_with_timer line 19: Expected True but got 0 Second run: function RunTheTest[35]..Test_lambda_with_timer line 19: Expected True but got 0 previously: #9220 - Timer tests are less reliable on Travis CI macOS 10.12/10.13. ref #6829 ref e39dade80b02 ref de13113dc16e ref https://github.com/neovim/neovim/pull/9095#issuecomment-429603452 > We don't guarantee that a X ms timer is triggered during Y ms sleep > for any X<Y, though I would expect the load to be really bad for this > to happen with X=10ms, Y=40ms. - Call test_garbagecollect_now(), as Vim does.
-rw-r--r--src/nvim/testdir/test_lambda.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_lambda.vim b/src/nvim/testdir/test_lambda.vim
index 2ac84c2213..6e07c874b4 100644
--- a/src/nvim/testdir/test_lambda.vim
+++ b/src/nvim/testdir/test_lambda.vim
@@ -33,9 +33,9 @@ function! Test_lambda_with_timer()
call s:Foo()
sleep 210ms
" do not collect lambda
- call garbagecollect()
+ call test_garbagecollect_now()
let m = s:n
- sleep 210ms
+ sleep 230ms
call timer_stop(s:timer_id)
call assert_true(m > 1)
call assert_true(s:n > m + 1)