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
Hide 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" {
...
@@ -73,12 +73,12 @@ test "Cluster consistency during live resharding" {
flush stdout
flush stdout
set target
[
dict get
[
get_myself
[
randomInt 5
]]
id
]
set target
[
dict get
[
get_myself
[
randomInt 5
]]
id
]
set tribpid
[
lindex
[
exec
\
set tribpid
[
lindex
[
exec
\
../../../src/redis-trib.rb reshard
\
../../../src/redis-cli --cluster reshard
\
--from all
\
--to $target
\
--slots 100
\
--yes
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
\
--cluster-from all
\
--cluster-to $target
\
--cluster-slots 100
\
--cluster-yes
\
|
[
info nameofexecutable
]
\
|
[
info nameofexecutable
]
\
../tests/helpers/onlydots.tcl
\
../tests/helpers/onlydots.tcl
\
&
]
0
]
&
]
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" {
...
@@ -31,9 +31,9 @@ test "Each master should have at least two replicas attached" {
set master0_id
[
dict get
[
get_myself 0
]
id
]
set master0_id
[
dict get
[
get_myself 0
]
id
]
test
"Resharding all the master #0 slots away from it"
{
test
"Resharding all the master #0 slots away from it"
{
set output
[
exec
\
set output
[
exec
\
../../../src/redis-
trib.rb
rebalance
\
../../../src/redis-
cli --cluster
rebalance
\
--weight $
{
master0_id
}
=0
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
>@ stdout
]
--cluster-weight $
{
master0_id
}
=0
>@ stdout
]
}
}
test
"Master #0 should lose its replicas"
{
test
"Master #0 should lose its replicas"
{
...
@@ -49,10 +49,10 @@ test "Resharding back some slot to master #0" {
...
@@ -49,10 +49,10 @@ test "Resharding back some slot to master #0" {
# new resharding.
# new resharding.
after 10000
after 10000
set output
[
exec
\
set output
[
exec
\
../../../src/redis-
trib.rb
rebalance
\
../../../src/redis-
cli --cluster
rebalance
\
--weight $
{
master0_id
}
=.01
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
\
--
use-empty-masters
\
--
cluster-weight $
{
master0_id
}
=.01
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
>@ stdout
]
--cluster-use-empty-masters
>@ stdout
]
}
}
test
"Master #0 should re-acquire one or more replicas"
{
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