false positive in expire tests mitigated with a sleep, but other solutions exist if needed later.

This commit is contained in:
antirez 2012-01-26 16:45:08 +01:00
parent 7f7a13b27b
commit 6c29410117

View File

@ -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}