]> git.saurik.com Git - redis.git/commitdiff
Regression for a crash with blocking ops and pipelining
authorantirez <antirez@gmail.com>
Thu, 28 Jul 2011 12:40:06 +0000 (14:40 +0200)
committerantirez <antirez@gmail.com>
Thu, 28 Jul 2011 12:40:06 +0000 (14:40 +0200)
tests/unit/protocol.tcl

index b0faf5dd74ed0dfe33f7620203560d5b52983fb8..516a834a858c14138503d6c447139ce0e0cd89d6 100644 (file)
@@ -60,3 +60,19 @@ start_server {tags {"protocol"}} {
         assert_error "*wrong*arguments*ping*" {r ping x y z}
     }
 }
+
+start_server {tags {"regression"}} {
+    test "Regression for a crash with blocking ops and pipelining" {
+        set rd [redis_deferring_client]
+        set fd [r channel]
+        set proto "*3\r\n\$5\r\nBLPOP\r\n\$6\r\nnolist\r\n\$1\r\n0\r\n"
+        puts -nonewline $fd $proto$proto
+        flush $fd
+        set res {}
+
+        $rd rpush nolist a
+        $rd read
+        $rd rpush nolist a
+        $rd read
+    }
+}