Skip to content

Commit

Permalink
Cluster test initialization: use transaction for reset + set-config-e…
Browse files Browse the repository at this point in the history
…poch.

Otherwise between the two commands other nodes may contact us making the
next SET-CONFIG-EPOCH call impossible.
  • Loading branch information
antirez committed Jan 22, 2015
1 parent ebb07a0 commit 7e41200
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/cluster/tests/includes/init-tests.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7e41200

Please sign in to comment.