X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/7f7499eeace8f69aeb32a4e92554eb0b144e8226..2c572622fb99f32328de58f815953f17d4ad0e4d:/tests/unit/cas.tcl diff --git a/tests/unit/cas.tcl b/tests/unit/cas.tcl index dc6a5ef7..d420d9e2 100644 --- a/tests/unit/cas.tcl +++ b/tests/unit/cas.tcl @@ -111,4 +111,25 @@ start_server {tags {"cas"}} { r ping r exec } {PONG} + + test {WATCH will consider touched keys target of EXPIRE} { + r del x + r set x foo + r watch x + r expire x 10 + r multi + r ping + r exec + } {} + + test {WATCH will not consider touched expired keys} { + r del x + r set x foo + r expire x 2 + r watch x + after 3000 + r multi + r ping + r exec + } {PONG} }