From 7e41200b98ecf1ac79fb342c6486e5a270729f85 Mon Sep 17 00:00:00 2001 From: antirez Date: Wed, 21 Jan 2015 18:48:08 +0100 Subject: [PATCH] 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. --- tests/cluster/tests/includes/init-tests.tcl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/cluster/tests/includes/init-tests.tcl b/tests/cluster/tests/includes/init-tests.tcl index 65fc806e1f1..117f7920844 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