aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/memory_usage_spec.lua
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2019-09-06 00:19:02 +0900
committererw7 <erw7.github@gmail.com>2020-05-07 16:48:08 +0900
commit9ad2ba1c5cde229265f6ca560c5925724d1cf58f (patch)
treede2331f73c531dbd3fd2708d071ef0ac862dd6cd /test/functional/legacy/memory_usage_spec.lua
parent1212390254c5de90513c0314efa94df7b9218590 (diff)
downloadrneovim-9ad2ba1c5cde229265f6ca560c5925724d1cf58f.tar.gz
rneovim-9ad2ba1c5cde229265f6ca560c5925724d1cf58f.tar.bz2
rneovim-9ad2ba1c5cde229265f6ca560c5925724d1cf58f.zip
vim-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) https://github.com/vim/vim/commit/08cda65ddfbb4bce8cef43726a0c00817fc47327
Diffstat (limited to 'test/functional/legacy/memory_usage_spec.lua')
-rw-r--r--test/functional/legacy/memory_usage_spec.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/legacy/memory_usage_spec.lua b/test/functional/legacy/memory_usage_spec.lua
index 14a7f2dbdd..2b4f8ea15e 100644
--- a/test/functional/legacy/memory_usage_spec.lua
+++ b/test/functional/legacy/memory_usage_spec.lua
@@ -143,8 +143,10 @@ describe('memory usage', function()
feed_command('so '..fname)
end
local last = monitor_memory_usage(pid)
+ -- The usage may be a bit less than the last value
+ local lower = before.last * 8 / 10
check_result({before=before, after=after, last=last},
- pcall(ok, before.last < last.last))
+ pcall(ok, lower < last.last))
check_result({before=before, after=after, last=last},
pcall(ok, last.last < after.max + (after.last - before.last)))
end)