diff --git a/tests/unit/memefficiency.tcl b/tests/unit/memefficiency.tcl index 1a558c3f9..0fad0fba7 100644 --- a/tests/unit/memefficiency.tcl +++ b/tests/unit/memefficiency.tcl @@ -71,8 +71,12 @@ run_solo {defrag} { # Wait for the active defrag to start working (decision once a # second). wait_for_condition 50 100 { - [s active_defrag_running] ne 0 + [s total_active_defrag_time] ne 0 } else { + after 120 ;# serverCron only updates the info once in 100ms + puts [r info memory] + puts [r info stats] + puts [r memory malloc-stats] fail "defrag not started." } @@ -218,8 +222,12 @@ run_solo {defrag} { # wait for the active defrag to start working (decision once a second) wait_for_condition 50 100 { - [s active_defrag_running] ne 0 + [s total_active_defrag_time] ne 0 } else { + after 120 ;# serverCron only updates the info once in 100ms + puts [r info memory] + puts [r info stats] + puts [r memory malloc-stats] fail "defrag not started." } @@ -336,8 +344,12 @@ run_solo {defrag} { if {[r config get activedefrag] eq "activedefrag yes"} { # wait for the active defrag to start working (decision once a second) wait_for_condition 50 100 { - [s active_defrag_running] ne 0 + [s total_active_defrag_time] ne 0 } else { + after 120 ;# serverCron only updates the info once in 100ms + puts [r info memory] + puts [r info stats] + puts [r memory malloc-stats] fail "defrag not started." } @@ -432,8 +444,12 @@ run_solo {defrag} { if {[r config get activedefrag] eq "activedefrag yes"} { # wait for the active defrag to start working (decision once a second) wait_for_condition 50 100 { - [s active_defrag_running] ne 0 + [s total_active_defrag_time] ne 0 } else { + after 120 ;# serverCron only updates the info once in 100ms + puts [r info memory] + puts [r info stats] + puts [r memory malloc-stats] fail "defrag not started." } @@ -552,8 +568,12 @@ run_solo {defrag} { if {[r config get activedefrag] eq "activedefrag yes"} { # wait for the active defrag to start working (decision once a second) wait_for_condition 50 100 { - [s active_defrag_running] ne 0 + [s total_active_defrag_time] ne 0 } else { + after 120 ;# serverCron only updates the info once in 100ms + puts [r info memory] + puts [r info stats] + puts [r memory malloc-stats] fail "defrag not started." }