Add test for deleting an expired key

Verify proper expire-before-delete behavior.

This test passes with the expire-before-delete commit and fails
without it.
This commit is contained in:
Matt Stancliff 2014-04-10 18:32:19 -04:00
parent 83d2830372
commit 88530804e8

View File

@ -261,6 +261,14 @@ start_server {tags {"basic"}} {
assert_equal 20 [r get x] assert_equal 20 [r get x]
} }
test "DEL against expired key" {
r debug set-active-expire 0
r setex keyExpire 1 valExpire
after 1100
assert_equal 0 [r del keyExpire]
r debug set-active-expire 1
}
test {EXISTS} { test {EXISTS} {
set res {} set res {}
r set newkey test r set newkey test