comparison src/testdir/test_memory_usage.vim @ 16044:f4a206d7a04d v8.1.1027

patch 8.1.1027: memory usage test sometimes fails commit https://github.com/vim/vim/commit/08cda65ddfbb4bce8cef43726a0c00817fc47327 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Mar 20 22:45:01 2019 +0100 patch 8.1.1027: memory usage test sometimes fails Problem: Memory usage test sometimes fails. Solution: Use 80% of before.last as the lower limit. (Christian Brabandt)
author Bram Moolenaar <Bram@vim.org>
date Wed, 20 Mar 2019 23:00:05 +0100
parents 879829e44091
children 853d73097325
comparison
equal deleted inserted replaced
16043:5c369c625205 16044:f4a206d7a04d
135 call term_sendkeys(vim.buf, ":so %\<CR>") 135 call term_sendkeys(vim.buf, ":so %\<CR>")
136 call WaitFor({-> term_getcursor(vim.buf)[0] == 1}) 136 call WaitFor({-> term_getcursor(vim.buf)[0] == 1})
137 let last = s:monitor_memory_usage(vim.pid).last 137 let last = s:monitor_memory_usage(vim.pid).last
138 endfor 138 endfor
139 139
140 call assert_inrange(before, after.max + (after.last - before), last) 140 " The usage may be a bit less than the last value
141 let lower = before * 8 / 10
142 call assert_inrange(lower, after.max + (after.last - before), last)
141 143
142 call vim.stop() 144 call vim.stop()
143 call delete(testfile) 145 call delete(testfile)
144 endfunc 146 endfunc