summaryrefslogtreecommitdiff
path: root/tests/cluster
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2015-01-21 18:48:08 +0100
committerantirez <antirez@gmail.com>2015-01-21 18:48:08 +0100
commit7e79b3f51a06ced3c13a9b8fe756e322705d5ca9 (patch)
tree931ed071f5ebace4c120a5c1675e2ecaed1fb9cb /tests/cluster
parent051a43e03a4db665b3bf6e8b45790298c86a96af (diff)
downloadredis-7e79b3f51a06ced3c13a9b8fe756e322705d5ca9.tar.gz
Cluster test initialization: use transaction for reset + set-config-epoch.
Otherwise between the two commands other nodes may contact us making the next SET-CONFIG-EPOCH call impossible.
Diffstat (limited to 'tests/cluster')
-rw-r--r--tests/cluster/tests/includes/init-tests.tcl2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/cluster/tests/includes/init-tests.tcl b/tests/cluster/tests/includes/init-tests.tcl
index 65fc806e1..117f79208 100644
--- a/tests/cluster/tests/includes/init-tests.tcl
+++ b/tests/cluster/tests/includes/init-tests.tcl
@@ -28,8 +28,10 @@ test "Cluster nodes are reachable" {
test "Cluster nodes hard reset" {
foreach_redis_id id {
catch {R $id flushall} ; # May fail for readonly slaves.
+ R $id MULTI
R $id cluster reset hard
R $id cluster set-config-epoch [expr {$id+1}]
+ R $id EXEC
R $id config set cluster-node-timeout 3000
R $id config set cluster-slave-validity-factor 10
R $id config rewrite