X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/64c7499eb88040c26aba264ab52756fd764d8fa4..5513397de7526f0e5e01c1d29a37813008703d6d:/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}