Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
77386ae0
Commit
77386ae0
authored
Aug 05, 2021
by
Viktor Söderqvist
Committed by
Oran Agra
Oct 04, 2021
Browse files
redis-cli ASK redirect test: Add retry loop to fix timing issue (#9315)
(cherry picked from commit
1c59567a
)
parent
0c959294
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/integration/redis-cli.tcl
View file @
77386ae0
...
@@ -223,8 +223,13 @@ if {!$::tls} { ;# fake_redis_node doesn't support TLS
...
@@ -223,8 +223,13 @@ if {!$::tls} { ;# fake_redis_node doesn't support TLS
set p2
[
exec $tclsh $script $port2
\
set p2
[
exec $tclsh $script $port2
\
"ASKING"
"+OK"
\
"ASKING"
"+OK"
\
"SET foo bar"
"+OK"
&
]
"SET foo bar"
"+OK"
&
]
# Sleep to make sure both fake nodes have started listening
# Make sure both fake nodes have started listening
after 100
wait_for_condition 50 50
{
[
catch
{
close
[
socket
"127.0.0.1"
$port1
]}]
== 0 &&
\
[
catch
{
close
[
socket
"127.0.0.1"
$port2
]}]
== 0
}
else
{
fail
"Failed to start fake Redis nodes"
}
# Run the cli
# Run the cli
assert_equal
"OK"
[
run_cli_host_port_db
"127.0.0.1"
$port1 0 -c SET foo bar
]
assert_equal
"OK"
[
run_cli_host_port_db
"127.0.0.1"
$port1 0 -c SET foo bar
]
}
}
...
@@ -238,7 +243,6 @@ if {!$::tls} { ;# fake_redis_node doesn't support TLS
...
@@ -238,7 +243,6 @@ if {!$::tls} { ;# fake_redis_node doesn't support TLS
test_nontty_cli
"No accidental unquoting of input arguments"
{
test_nontty_cli
"No accidental unquoting of input arguments"
{
run_cli --quoted-input set
{
"
\x41\x41
"
}
quoted-val
run_cli --quoted-input set
{
"
\x41\x41
"
}
quoted-val
run_cli set
{
"
\x41\x41
"
}
unquoted-val
run_cli set
{
"
\x41\x41
"
}
unquoted-val
assert_equal
"quoted-val"
[
r get AA
]
assert_equal
"quoted-val"
[
r get AA
]
assert_equal
"unquoted-val"
[
r get
{
"
\x41\x41
"
}]
assert_equal
"unquoted-val"
[
r get
{
"
\x41\x41
"
}]
}
}
...
...
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