From 4bb1ccc6ebaa5944f8283500d69cae505f9d04d8 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 28 Jul 2011 14:40:06 +0200 Subject: [PATCH] Regression for a crash with blocking ops and pipelining --- tests/unit/protocol.tcl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/unit/protocol.tcl b/tests/unit/protocol.tcl index b0faf5dd..516a834a 100644 --- a/tests/unit/protocol.tcl +++ b/tests/unit/protocol.tcl @@ -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 + } +} -- GitLab