From: antirez Date: Thu, 26 Jan 2012 15:45:08 +0000 (+0100) Subject: false positive in expire tests mitigated with a sleep, but other solutions exist... X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/6c29410117b100b13764280bb3c58604b769c4fc false positive in expire tests mitigated with a sleep, but other solutions exist if needed later. --- 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}