Skip to content

Commit 51b12ed

Browse files
committed
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 redis#3786.
1 parent 635bbe5 commit 51b12ed

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

tests/unit/memefficiency.tcl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ start_server {tags {"memefficiency"}} {
3838

3939
start_server {tags {"defrag"}} {
4040
if {[string match {*jemalloc*} [s mem_allocator]]} {
41-
test "Actove defrag" {
41+
test "Active defrag" {
4242
r config set activedefrag no
4343
r config set active-defrag-threshold-lower 5
4444
r config set active-defrag-ignore-bytes 2mb
@@ -70,9 +70,10 @@ start_server {tags {"defrag"}} {
7070
# instead we currently look at RSS so we need to ask for purge
7171
r memory purge
7272

73-
# test the the fragmentation is lower and that the defragger stopped working
73+
# Test the the fragmentation is lower and that the defragger
74+
# stopped working
7475
set frag [s mem_fragmentation_ratio]
75-
assert {$frag < 1.4}
76+
assert {$frag < 1.55}
7677
set misses [s active_defrag_misses]
7778
after 500
7879
set misses2 [s active_defrag_misses]

0 commit comments

Comments
 (0)