]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.1.1435: memory usage test is a bit too flaky v8.1.1435
authorBram Moolenaar <Bram@vim.org>
Fri, 31 May 2019 18:23:25 +0000 (20:23 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 31 May 2019 18:23:25 +0000 (20:23 +0200)
Problem:    Memory usage test is a bit too flaky.
Solution:   Adjust the tolerances a bit. (Christian Brabandt)

src/testdir/test_memory_usage.vim
src/version.c

index 3775552b54fdcab2d6518c56c43fce16f17f4e8d..8c2f8f7315d9b7171434a36fc9462ac6f56fa6f9 100644 (file)
@@ -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()
index 03ee6327c6c30a898286262b3f888a12c82a017c..fdb0844ddda6786f230f65d907771beea78e77b0 100644 (file)
@@ -767,6 +767,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1435,
 /**/
     1434,
 /**/