X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/7b81e5a16ca577b7aa10dd0398cce4ba9cdf0842..5ba79bda7f38b88afc1e93741413bec077c97417:/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}