mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 16:48:27 -05:00
f228ec1ea5
This will increase the size of an already large COB (one already passed the threshold for disconnection) This could also mean that we'll attempt to write that data to the socket and the replica will manage to read it, which will result in an undesired partial sync (undesired for the test)
34 lines
798 B
Tcl
34 lines
798 B
Tcl
start_server {tags {"quit"}} {
|
|
|
|
test "QUIT returns OK" {
|
|
reconnect
|
|
assert_equal OK [r quit]
|
|
assert_error * {r ping}
|
|
}
|
|
|
|
test "Pipelined commands after QUIT must not be executed" {
|
|
reconnect
|
|
r write [format_command quit]
|
|
r write [format_command set foo bar]
|
|
r flush
|
|
assert_equal OK [r read]
|
|
assert_error * {r read}
|
|
|
|
reconnect
|
|
assert_equal {} [r get foo]
|
|
}
|
|
|
|
test "Pipelined commands after QUIT that exceed read buffer size" {
|
|
reconnect
|
|
r write [format_command quit]
|
|
r write [format_command set foo [string repeat "x" 1024]]
|
|
r flush
|
|
assert_equal OK [r read]
|
|
assert_error * {r read}
|
|
|
|
reconnect
|
|
assert_equal {} [r get foo]
|
|
|
|
}
|
|
}
|