Blob Blame History Raw
commit 2a381829b2418018506a3dde4bf125a1348726f2
Author: dormando <dormando@rydia.net>
Date:   Fri Aug 10 15:31:22 2018 -0700

    t/lru-maintainer.t: check for WARM item earlier
    
    item might get pushed back out as we keep doing work. also use the move
    counter instead of static number, in case of timing goofups pushing the warm
    item back out.

diff --git a/t/lru-maintainer.t b/t/lru-maintainer.t
index 04fa76a..93091af 100644
--- a/t/lru-maintainer.t
+++ b/t/lru-maintainer.t
@@ -68,6 +68,8 @@ for (my $key = 0; $key < 100; $key++) {
             }
             last;
         }
+        $stats = mem_stats($sock, "items");
+        isnt($stats->{"items:31:moves_to_warm"}, 0, "our canary moved to warm");
     }
     print $sock "set key$key 0 0 66560\r\n$value\r\n";
     is(scalar <$sock>, "STORED\r\n", "stored key$key");
@@ -76,8 +78,6 @@ for (my $key = 0; $key < 100; $key++) {
 {
     my $stats = mem_stats($sock);
     isnt($stats->{evictions}, 0, "some evictions happened");
-    my $istats = mem_stats($sock, "items");
-    isnt($istats->{"items:31:number_warm"}, 0, "our canary moved to warm");
     use Data::Dumper qw/Dumper/;
 }