Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
hiredis
Commits
fc790ebe
Commit
fc790ebe
authored
Apr 21, 2011
by
Pieter Noordhuis
Browse files
State should not be reset after protocol error
parent
26588f50
Changes
1
Hide whitespace changes
Inline
Side-by-side
test.c
View file @
fc790ebe
...
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment