Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
5b47783d
Commit
5b47783d
authored
Oct 08, 2014
by
antirez
Browse files
Cluster test: less console-spammy resharding test.
parent
034ca986
Changes
2
Show whitespace changes
Inline
Side-by-side
tests/cluster/tests/04-resharding.tcl
View file @
5b47783d
...
@@ -53,13 +53,16 @@ test "Cluster consistency during live resharding" {
...
@@ -53,13 +53,16 @@ test "Cluster consistency during live resharding" {
puts -nonewline
"...Starting resharding..."
puts -nonewline
"...Starting 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
[
exec
\
set tribpid
[
lindex
[
exec
\
../../../src/redis-trib.rb reshard
\
../../../src/redis-trib.rb reshard
\
--from all
\
--from all
\
--to $target
\
--to $target
\
--slots 100
\
--slots 100
\
--yes
\
--yes
\
127.0.0.1:
[
get_instance_attrib redis 0 port
]
&
]
127.0.0.1:
[
get_instance_attrib redis 0 port
]
\
|
[
info nameofexecutable
]
\
../tests/helpers/onlydots.tcl
\
&
]
0
]
}
}
# Write random data to random list.
# Write random data to random list.
...
...
tests/cluster/tests/helpers/onlydots.tcl
0 → 100644
View file @
5b47783d
# Read the standard input and only shows dots in the output, filtering out
# all the other characters. Designed to avoid bufferization so that when
# we get the output of redis-trib and want to show just the dots, we'll see
# the dots as soon as redis-trib will output them.
fconfigure stdin -buffering none
while 1
{
set c
[
read stdin 1
]
if
{
$c
eq
{
.
}}
{
puts -nonewline .
flush stdout
}
}
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