Skip to content

Commit 5d508dd

Browse files
committed
patch 8.1.1435: memory usage test is a bit too flaky
Problem: Memory usage test is a bit too flaky. Solution: Adjust the tolerances a bit. (Christian Brabandt)
1 parent 1ab74a5 commit 5d508dd

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

src/testdir/test_memory_usage.vim

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,14 @@ func Test_memory_func_capture_vargs()
9797
let after = s:monitor_memory_usage(vim.pid)
9898

9999
" Estimate the limit of max usage as 2x initial usage.
100-
" The lower limit can fluctuate a bit, use 98%.
101-
call assert_inrange(before * 98 / 100, 2 * before, after.max)
100+
" The lower limit can fluctuate a bit, use 97%.
101+
call assert_inrange(before * 97 / 100, 2 * before, after.max)
102102

103103
" In this case, garbage collecting is not needed.
104-
" The value might fluctuate a bit, allow for 3% tolerance.
104+
" The value might fluctuate a bit, allow for 3% tolerance below and 5% above.
105+
" Based on various test runs.
105106
let lower = after.last * 97 / 100
106-
let upper = after.last * 103 / 100
107+
let upper = after.last * 105 / 100
107108
call assert_inrange(lower, upper, after.max)
108109

109110
call vim.stop()

src/version.c

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

768768
static int included_patches[] =
769769
{ /* Add new patch number below this line */
770+
/**/
771+
1435,
770772
/**/
771773
1434,
772774
/**/

0 commit comments

Comments
 (0)