diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-31 20:23:25 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-31 20:23:25 +0200 |
commit | 5d508dd39e810d446f29dfd4f4e745b802875001 (patch) | |
tree | 5e116e5cf5460aaa525a4aa87867ec3691e771fe /src/testdir/test_memory_usage.vim | |
parent | 1ab74a5af36933f1c3023a910af20280bb79bd6c (diff) | |
download | vim-git-5d508dd39e810d446f29dfd4f4e745b802875001.tar.gz |
patch 8.1.1435: memory usage test is a bit too flakyv8.1.1435
Problem: Memory usage test is a bit too flaky.
Solution: Adjust the tolerances a bit. (Christian Brabandt)
Diffstat (limited to 'src/testdir/test_memory_usage.vim')
-rw-r--r-- | src/testdir/test_memory_usage.vim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/testdir/test_memory_usage.vim b/src/testdir/test_memory_usage.vim index 3775552b5..8c2f8f731 100644 --- a/src/testdir/test_memory_usage.vim +++ b/src/testdir/test_memory_usage.vim @@ -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() |