X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/794e6ce14ff85f00b0d3e86365e9cc45a90d3bcf..0bd6d68e34bc41cd80cd7fc44aab9cf3884de8dc:/tests/unit/other.tcl?ds=sidebyside diff --git a/tests/unit/other.tcl b/tests/unit/other.tcl index bb65570a..14fd73ac 100644 --- a/tests/unit/other.tcl +++ b/tests/unit/other.tcl @@ -140,6 +140,12 @@ start_server {tags {"other"}} { r pexpireat pz [expr {([clock seconds]+3000)*1000}] # 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}