X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/9e5d2e8bd664743d309f1647e29cdaf43f463051..80091bbaacf83d82635f3202c1db3f61f56dc0d0:/tests/unit/cas.tcl diff --git a/tests/unit/cas.tcl b/tests/unit/cas.tcl index febc7d6b..d420d9e2 100644 --- a/tests/unit/cas.tcl +++ b/tests/unit/cas.tcl @@ -1,4 +1,4 @@ -start_server {} { +start_server {tags {"cas"}} { test {EXEC works on WATCHed key not modified} { r watch x y z r watch k @@ -111,4 +111,25 @@ start_server {} { 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} }