From: antirez Date: Sat, 17 Nov 2012 11:11:13 +0000 (+0100) Subject: Test: MULTI state is cleared after EXECABORT error. X-Git-Url: https://git.saurik.com/redis.git/commitdiff_plain/2b45ef020cf30a3376d1b406b1793a554b43bdea Test: MULTI state is cleared after EXECABORT error. --- diff --git a/tests/unit/multi.tcl b/tests/unit/multi.tcl index f8d42d4c..6f44767b 100644 --- a/tests/unit/multi.tcl +++ b/tests/unit/multi.tcl @@ -74,6 +74,17 @@ start_server {tags {"multi"}} { list [r exists foo1] [r exists foo2] } {0 0} + test {If EXEC aborts, the client MULTI state is cleared} { + r del foo1 foo2 + r multi + r set foo1 bar1 + catch {r non-existing-command} + r set foo2 bar2 + catch {r exec} e + assert_match {EXECABORT*} $e + r ping + } {PONG} + test {EXEC works on WATCHed key not modified} { r watch x y z r watch k