Mercurial > vim
changeset 16107:b951bea7d11e v8.1.1058
patch 8.1.1058: memory usage test may still fail on some systems
commit https://github.com/vim/vim/commit/3a731ee0c2dd34792c1b21fc4c699a84129f1b86
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Mar 27 21:41:36 2019 +0100
patch 8.1.1058: memory usage test may still fail on some systems
Problem: Memory usage test may still fail on some systems.
Solution: Use 98% of the lower limit. (Christian Brabandt)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 27 Mar 2019 21:45:05 +0100 |
parents | b08497568647 |
children | a0407a92cab9 |
files | src/testdir/test_memory_usage.vim src/version.c |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_memory_usage.vim +++ b/src/testdir/test_memory_usage.vim @@ -97,9 +97,11 @@ func Test_memory_func_capture_vargs() let after = s:monitor_memory_usage(vim.pid) " Estimate the limit of max usage as 2x initial usage. - call assert_inrange(before, 2 * before, after.max) - " In this case, garbage collecting is not needed. The value might fluctuate - " a bit, allow for 3% tolerance. + " The lower limit can fluctuate a bit, use 98%. + call assert_inrange(before * 98 / 100, 2 * before, after.max) + + " In this case, garbage collecting is not needed. + " The value might fluctuate a bit, allow for 3% tolerance. let lower = after.last * 97 / 100 let upper = after.last * 103 / 100 call assert_inrange(lower, upper, after.max)