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