From 6c29410117b100b13764280bb3c58604b769c4fc Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 26 Jan 2012 16:45:08 +0100 Subject: [PATCH] false positive in expire tests mitigated with a sleep, but other solutions exist if needed later. --- tests/unit/other.tcl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/unit/other.tcl b/tests/unit/other.tcl index 6bdb0b3f..14fd73ac 100644 --- a/tests/unit/other.tcl +++ b/tests/unit/other.tcl @@ -141,6 +141,11 @@ start_server {tags {"other"}} { # Reload and check waitForBgrewriteaof r + # We need to wait two seconds to avoid false positives here, otherwise + # the DEBUG LOADAOF command may read a partial file. + # Another solution would be to set the fsync policy to no, since this + # prevents write() to be delayed by the completion of fsync(). + after 2000 r debug loadaof set ttl [r ttl x] assert {$ttl > 900 && $ttl <= 1000} -- 2.47.2