Skip to content

Commit 1832d12

Browse files
committed
patch 8.2.0071: memory test often fails on Cirrus CI
Problem: Memory test often fails on Cirrus CI. Solution: Allow for more tolerance in the upper limit. Remove sleep.
1 parent d518f95 commit 1832d12

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/testdir/test_memory_usage.vim

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,6 @@ func Test_memory_func_capture_lvars()
133133

134134
let vim = s:vim_new()
135135
call vim.start('--clean', '-c', 'set noswapfile', testfile)
136-
" Wait a bit until the process has started and sourced the script.
137-
sleep 200m
138136
let before = s:monitor_memory_usage(vim.pid).last
139137

140138
call term_sendkeys(vim.buf, ":so %\<CR>")
@@ -150,9 +148,15 @@ func Test_memory_func_capture_lvars()
150148

151149
" The usage may be a bit less than the last value, use 80%.
152150
" Allow for 20% tolerance at the upper limit. That's very permissive, but
153-
" otherwise the test fails sometimes.
151+
" otherwise the test fails sometimes. On Cirrus CI with FreeBSD we need to
152+
" be even more permissive.
153+
if has('bsd')
154+
let multiplier = 14
155+
else
156+
let multiplier = 12
157+
endif
154158
let lower = before * 8 / 10
155-
let upper = (after.max + (after.last - before)) * 12 / 10
159+
let upper = (after.max + (after.last - before)) * multiplier / 10
156160
call assert_inrange(lower, upper, last)
157161

158162
call vim.stop()

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -742,6 +742,8 @@ static char *(features[]) =
742742

743743
static int included_patches[] =
744744
{ /* Add new patch number below this line */
745+
/**/
746+
71,
745747
/**/
746748
70,
747749
/**/

0 commit comments

Comments
 (0)