summaryrefslogtreecommitdiff
path: root/src/testdir/test_memory_usage.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-03-20 22:45:01 +0100
committerBram Moolenaar <Bram@vim.org>2019-03-20 22:45:01 +0100
commit08cda65ddfbb4bce8cef43726a0c00817fc47327 (patch)
treef79114d29360e710aaeb12ea23a38588f4988a5a /src/testdir/test_memory_usage.vim
parentd00e024d9f2b631226c1dba83cb203739b0d02a3 (diff)
downloadvim-git-08cda65ddfbb4bce8cef43726a0c00817fc47327.tar.gz
patch 8.1.1027: memory usage test sometimes failsv8.1.1027
Problem: Memory usage test sometimes fails. Solution: Use 80% of before.last as the lower limit. (Christian Brabandt)
Diffstat (limited to 'src/testdir/test_memory_usage.vim')
-rw-r--r--src/testdir/test_memory_usage.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/testdir/test_memory_usage.vim b/src/testdir/test_memory_usage.vim
index 23dcc62ac..b70d2d03f 100644
--- a/src/testdir/test_memory_usage.vim
+++ b/src/testdir/test_memory_usage.vim
@@ -137,7 +137,9 @@ func Test_memory_func_capture_lvars()
let last = s:monitor_memory_usage(vim.pid).last
endfor
- call assert_inrange(before, after.max + (after.last - before), last)
+ " The usage may be a bit less than the last value
+ let lower = before * 8 / 10
+ call assert_inrange(lower, after.max + (after.last - before), last)
call vim.stop()
call delete(testfile)