diff options
Diffstat (limited to 'tests/unit/expire.tcl')
-rw-r--r-- | tests/unit/expire.tcl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/expire.tcl b/tests/unit/expire.tcl index 0a50dd31b..eddc7c303 100644 --- a/tests/unit/expire.tcl +++ b/tests/unit/expire.tcl @@ -204,4 +204,19 @@ start_server {tags {"expire"}} { catch {r expire foo ""} e set e } {*not an integer*} + + test {SET - use EX/PX option, TTL should not be reseted after loadaof} { + r config set appendonly yes + r set foo bar EX 100 + after 2000 + r debug loadaof + set ttl [r ttl foo] + assert {$ttl <= 98 && $ttl > 90} + + r set foo bar PX 100000 + after 2000 + r debug loadaof + set ttl [r ttl foo] + assert {$ttl <= 98 && $ttl > 90} + } } |