diff options
author | antirez <antirez@gmail.com> | 2014-10-08 10:12:40 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2014-10-08 10:12:40 +0200 |
commit | 5b47783d77d733f0019171d6db5d7841d43f1fef (patch) | |
tree | 1721341bb173f2340412e36bd44cb1313f97b9dc /tests/cluster | |
parent | 034ca98678e1ba122d390675fde709538bffa91a (diff) | |
download | redis-5b47783d77d733f0019171d6db5d7841d43f1fef.tar.gz |
Cluster test: less console-spammy resharding test.
Diffstat (limited to 'tests/cluster')
-rw-r--r-- | tests/cluster/tests/04-resharding.tcl | 7 | ||||
-rw-r--r-- | tests/cluster/tests/helpers/onlydots.tcl | 14 |
2 files changed, 19 insertions, 2 deletions
diff --git a/tests/cluster/tests/04-resharding.tcl b/tests/cluster/tests/04-resharding.tcl index 376061db3..b9e772351 100644 --- a/tests/cluster/tests/04-resharding.tcl +++ b/tests/cluster/tests/04-resharding.tcl @@ -53,13 +53,16 @@ test "Cluster consistency during live resharding" { puts -nonewline "...Starting resharding..." flush stdout set target [dict get [get_myself [randomInt 5]] id] - set tribpid [exec \ + set tribpid [lindex [exec \ ../../../src/redis-trib.rb 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] \ + | [info nameofexecutable] \ + ../tests/helpers/onlydots.tcl \ + &] 0] } # Write random data to random list. diff --git a/tests/cluster/tests/helpers/onlydots.tcl b/tests/cluster/tests/helpers/onlydots.tcl new file mode 100644 index 000000000..49040854a --- /dev/null +++ b/tests/cluster/tests/helpers/onlydots.tcl @@ -0,0 +1,14 @@ +# 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 + } +} |