diff options
author | erw7 <erw7.github@gmail.com> | 2019-09-06 00:30:30 +0900 |
---|---|---|
committer | erw7 <erw7.github@gmail.com> | 2020-05-07 16:48:08 +0900 |
commit | 6b3399338f831c69f8b9da63d8277860d3a302d6 (patch) | |
tree | 5fcea6d8938143f14032664cc7bcd5c86196d3c4 /test/functional/legacy/memory_usage_spec.lua | |
parent | 7acdc9da1dec4306818302a3d2518fc2caf02963 (diff) | |
download | rneovim-6b3399338f831c69f8b9da63d8277860d3a302d6.tar.gz rneovim-6b3399338f831c69f8b9da63d8277860d3a302d6.tar.bz2 rneovim-6b3399338f831c69f8b9da63d8277860d3a302d6.zip |
vim-patch:8.1.1037: memory usage test may still fail on some systems
Problem: Memory usage test may still fail on some systems.
Solution: Increase tolerance from 3% to 20%.
https://github.com/vim/vim/commit/6b6f7aae4a3329d685e512699287605540257b40
Diffstat (limited to 'test/functional/legacy/memory_usage_spec.lua')
-rw-r--r-- | test/functional/legacy/memory_usage_spec.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/legacy/memory_usage_spec.lua b/test/functional/legacy/memory_usage_spec.lua index e2e5277acb..b52742eaac 100644 --- a/test/functional/legacy/memory_usage_spec.lua +++ b/test/functional/legacy/memory_usage_spec.lua @@ -146,9 +146,10 @@ describe('memory usage', function() end local last = monitor_memory_usage(pid) -- The usage may be a bit less than the last value, use 80%. - -- Allow for 3% tolerance at the upper limit. + -- Allow for 20% tolerance at the upper limit. That's very permissive, but + -- otherwise the test fails sometimes. local lower = before.last * 8 / 10 - local upper = (after.max + (after.last - before.last)) * 103 / 100 + local upper = (after.max + (after.last - before.last)) * 12 / 10 check_result({before=before, after=after, last=last}, pcall(ok, lower < last.last)) check_result({before=before, after=after, last=last}, |