X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/b4fb720b1014a05fb1e3238d1b7b73883e20cb00..0daf7a2d16256a72397d2acd87b25e4e1c76d7ec:/tests/unit/other.tcl 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}