0
0
mirror of https://github.com/vim/vim.git synced 2025-10-02 05:04:20 -04:00

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)
This commit is contained in:
Bram Moolenaar
2019-05-31 20:23:25 +02:00
parent 1ab74a5af3
commit 5d508dd39e
2 changed files with 7 additions and 4 deletions

View File

@@ -97,13 +97,14 @@ func Test_memory_func_capture_vargs()
let after = s:monitor_memory_usage(vim.pid)
" Estimate the limit of max usage as 2x initial usage.
" The lower limit can fluctuate a bit, use 98%.
call assert_inrange(before * 98 / 100, 2 * before, after.max)
" The lower limit can fluctuate a bit, use 97%.
call assert_inrange(before * 97 / 100, 2 * before, after.max)
" In this case, garbage collecting is not needed.
" The value might fluctuate a bit, allow for 3% tolerance.
" The value might fluctuate a bit, allow for 3% tolerance below and 5% above.
" Based on various test runs.
let lower = after.last * 97 / 100
let upper = after.last * 103 / 100
let upper = after.last * 105 / 100
call assert_inrange(lower, upper, after.max)
call vim.stop()

View File

@@ -767,6 +767,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1435,
/**/
1434,
/**/