Commit 7e79b3f5 authored by antirez's avatar antirez
Browse files

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.
parent 051a43e0
...@@ -28,8 +28,10 @@ test "Cluster nodes are reachable" { ...@@ -28,8 +28,10 @@ test "Cluster nodes are reachable" {
test "Cluster nodes hard reset" { test "Cluster nodes hard reset" {
foreach_redis_id id { foreach_redis_id id {
catch {R $id flushall} ; # May fail for readonly slaves. catch {R $id flushall} ; # May fail for readonly slaves.
R $id MULTI
R $id cluster reset hard R $id cluster reset hard
R $id cluster set-config-epoch [expr {$id+1}] 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-node-timeout 3000
R $id config set cluster-slave-validity-factor 10 R $id config set cluster-slave-validity-factor 10
R $id config rewrite R $id config rewrite
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment