State should not be reset after protocol error
This commit is contained in:
parent
26588f5007
commit
fc790ebea6
4
test.c
4
test.c
|
@ -325,14 +325,14 @@ static void test_reply_reader(void) {
|
|||
test_cond(ret == REDIS_OK && reply == (void*)REDIS_REPLY_STATUS);
|
||||
redisReplyReaderFree(reader);
|
||||
|
||||
test("Properly reset state after protocol error: ");
|
||||
test("Don't reset state after protocol error: ");
|
||||
reader = redisReplyReaderCreate();
|
||||
redisReplyReaderSetReplyObjectFunctions(reader,NULL);
|
||||
redisReplyReaderFeed(reader,(char*)"x",1);
|
||||
ret = redisReplyReaderGetReply(reader,&reply);
|
||||
assert(ret == REDIS_ERR);
|
||||
ret = redisReplyReaderGetReply(reader,&reply);
|
||||
test_cond(ret == REDIS_OK && reply == NULL)
|
||||
test_cond(ret == REDIS_ERR && reply == NULL);
|
||||
}
|
||||
|
||||
static void test_throughput(void) {
|
||||
|
|
Loading…
Reference in New Issue