diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-05-28 03:42:15 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-05-28 03:42:15 +0000 |
commit | 49c45c6ea09464862779b09ad7f22c30977a2060 (patch) | |
tree | cde57fe90af752582b9894c25b1a6b0dbf341868 | |
parent | 86d5209d0ebdd597ffa19bff5f227ca10ba383c6 (diff) | |
download | rainbows-49c45c6ea09464862779b09ad7f22c30977a2060.tar.gz |
it's hard to make this test reliable, but try to add a small fudge factor based on the MRI default GC malloc limit.
-rwxr-xr-x | t/t0005-large-file-response.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/t0005-large-file-response.sh b/t/t0005-large-file-response.sh index d25134e..b663e65 100755 --- a/t/t0005-large-file-response.sh +++ b/t/t0005-large-file-response.sh @@ -72,8 +72,12 @@ t_begin "shutdown server" && { t_begin "compare RSS before and after" && { diff=$(( $rss_after - $rss_before )) + + # default GC malloc limit in MRI: + fudge=$(( 8 * 1024 * 1024 )) + t_info "test diff=$diff < orig=$random_blob_size" - test $diff -le $random_blob_size + test $diff -le $(( $random_blob_size + $fudge )) } dbgcat r_err |