X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/9fcfd6b6512dd975ba3eadf476b7d5670c9dbb79..cf1eefa4206b23327e38a144d8d20543307fdbe4:/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} }