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
af4584d6
Commit
af4584d6
authored
Apr 20, 2018
by
artix
Browse files
Cluster tests now using redis-cli instead of redis-trib
parent
be94e890
Changes
2
Show whitespace changes
Inline
Side-by-side
tests/cluster/tests/04-resharding.tcl
View file @
af4584d6
...
...
@@ -73,12 +73,12 @@ test "Cluster consistency during live resharding" {
flush stdout
set target
[
dict get
[
get_myself
[
randomInt 5
]]
id
]
set tribpid
[
lindex
[
exec
\
../../../src/redis-trib.rb reshard
\
--from all
\
--to $target
\
--slots 100
\
--yes
\
../../../src/redis-cli --cluster reshard
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
\
--cluster-from all
\
--cluster-to $target
\
--cluster-slots 100
\
--cluster-yes
\
|
[
info nameofexecutable
]
\
../tests/helpers/onlydots.tcl
\
&
]
0
]
...
...
tests/cluster/tests/12-replica-migration-2.tcl
View file @
af4584d6
...
...
@@ -31,9 +31,9 @@ test "Each master should have at least two replicas attached" {
set master0_id
[
dict get
[
get_myself 0
]
id
]
test
"Resharding all the master #0 slots away from it"
{
set output
[
exec
\
../../../src/redis-
trib.rb
rebalance
\
--weight $
{
master0_id
}
=0
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
>@ stdout
]
../../../src/redis-
cli --cluster
rebalance
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
\
--cluster-weight $
{
master0_id
}
=0
>@ stdout
]
}
test
"Master #0 should lose its replicas"
{
...
...
@@ -49,10 +49,10 @@ test "Resharding back some slot to master #0" {
# new resharding.
after 10000
set output
[
exec
\
../../../src/redis-
trib.rb
rebalance
\
--weight $
{
master0_id
}
=.01
\
--
use-empty-masters
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
>@ stdout
]
../../../src/redis-
cli --cluster
rebalance
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
\
--
cluster-weight $
{
master0_id
}
=.01
\
--cluster-use-empty-masters
>@ stdout
]
}
test
"Master #0 should re-acquire one or more replicas"
{
...
...
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