Unverified Commit c9124145 authored by Binbin's avatar Binbin Committed by GitHub
Browse files

Fix new subscribe mode test in reply-schemas-validator (#11939)

The reason is in reply-schemas-validator, the resp of the
client we create will be client_default_resp (currently 3):
```
client *createClient(connection *conn) {
    client *c = zmalloc(sizeof(client));
 #ifdef LOG_REQ_RES
    reqresReset(c, 0);
    c->resp = server.client_default_resp;
 #else
    c->resp = 2;
 #endif
}
```

But current_resp3 in redis-cli will be inconsistent with it,
the test adds a simple hello 3 to avoid this failure, test
was added in #11873.

Added help descriptions for dont-pre-clean option, it was
added in #10273
parent 56eef6fb
...@@ -194,6 +194,10 @@ start_server {tags {"cli"}} { ...@@ -194,6 +194,10 @@ start_server {tags {"cli"}} {
} }
test_interactive_cli "Subscribed mode" { test_interactive_cli "Subscribed mode" {
if {$::force_resp3} {
run_command $fd "hello 3"
}
set reading "Reading messages... (press Ctrl-C to quit or any key to type command)\r" set reading "Reading messages... (press Ctrl-C to quit or any key to type command)\r"
set erase "\033\[K"; # Erases the "Reading messages..." line. set erase "\033\[K"; # Erases the "Reading messages..." line.
...@@ -215,6 +219,8 @@ start_server {tags {"cli"}} { ...@@ -215,6 +219,8 @@ start_server {tags {"cli"}} {
assert_equal $erase$unsub1$unsub2$reading \ assert_equal $erase$unsub1$unsub2$reading \
[run_command $fd "unsubscribe ch1 ch2"] [run_command $fd "unsubscribe ch1 ch2"]
run_command $fd "hello 2"
# Command forbidden in subscribed mode (RESP2). # Command forbidden in subscribed mode (RESP2).
set err "(error) ERR Can't execute 'get': only (P|S)SUBSCRIBE / (P|S)UNSUBSCRIBE / PING / QUIT / RESET are allowed in this context\n" set err "(error) ERR Can't execute 'get': only (P|S)SUBSCRIBE / (P|S)UNSUBSCRIBE / PING / QUIT / RESET are allowed in this context\n"
assert_equal $erase$err$reading [run_command $fd "get k"] assert_equal $erase$err$reading [run_command $fd "get k"]
......
...@@ -616,6 +616,7 @@ proc print_help_screen {} { ...@@ -616,6 +616,7 @@ proc print_help_screen {} {
"--skiptest <test> Test name or regexp pattern (if <test> starts with '/') to skip. This option can be repeated." "--skiptest <test> Test name or regexp pattern (if <test> starts with '/') to skip. This option can be repeated."
"--tags <tags> Run only tests having specified tags or not having '-' prefixed tags." "--tags <tags> Run only tests having specified tags or not having '-' prefixed tags."
"--dont-clean Don't delete redis log files after the run." "--dont-clean Don't delete redis log files after the run."
"--dont-pre-clean Don't delete existing redis log files before the run."
"--no-latency Skip latency measurements and validation by some tests." "--no-latency Skip latency measurements and validation by some tests."
"--stop Blocks once the first test fails." "--stop Blocks once the first test fails."
"--loop Execute the specified set of tests forever." "--loop Execute the specified set of tests forever."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment