summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2017-04-22 13:21:41 +0200
committerantirez <antirez@gmail.com>2017-04-22 13:21:41 +0200
commita17390853dfa294b26167eed59b81379dc833a52 (patch)
tree6d208c34be51d70c3b5af6e0eea282af8d2b7f88
parent0fb5c4ebd8f0b9532b02e33666007b4f824d436c (diff)
downloadredis-a17390853dfa294b26167eed59b81379dc833a52.tar.gz
Defrag: fix test false positive.
Apparently 1.4 is too low compared to what you get in certain setups (including mine). I raised it to 1.55 that hopefully is still enough to test that the fragmentation went down from 1.7 but without incurring in issues, however the test setup may be still fragile so certain times this may lead to false positives again, it's hard to test for these things in a determinsitic way. Related to #3786.
-rw-r--r--tests/unit/memefficiency.tcl7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/unit/memefficiency.tcl b/tests/unit/memefficiency.tcl
index 12cb84584..5f0bed176 100644
--- a/tests/unit/memefficiency.tcl
+++ b/tests/unit/memefficiency.tcl
@@ -38,7 +38,7 @@ start_server {tags {"memefficiency"}} {
start_server {tags {"defrag"}} {
if {[string match {*jemalloc*} [s mem_allocator]]} {
- test "Actove defrag" {
+ test "Active defrag" {
r config set activedefrag no
r config set active-defrag-threshold-lower 5
r config set active-defrag-ignore-bytes 2mb
@@ -70,9 +70,10 @@ start_server {tags {"defrag"}} {
# instead we currently look at RSS so we need to ask for purge
r memory purge
- # test the the fragmentation is lower and that the defragger stopped working
+ # Test the the fragmentation is lower and that the defragger
+ # stopped working
set frag [s mem_fragmentation_ratio]
- assert {$frag < 1.4}
+ assert {$frag < 1.55}
set misses [s active_defrag_misses]
after 500
set misses2 [s active_defrag_misses]