Skip to content

Commit

Permalink
Changes peers.json recovery test to only use protocol 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Phillips committed Jul 21, 2016
1 parent 9997b5e commit b4cb7e6
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions raft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1352,10 +1352,10 @@ func TestRaft_SnapshotRestore(t *testing.T) {

// TODO: Add a dedicated test for RecoverCluster() hitting the edges.

func testRecover(t *testing.T, protocolVersion int) {
func TestRaft_SnapshotRestore_PeerChange(t *testing.T) {
// Make the cluster.
conf := inmemConfig(t)
conf.ProtocolVersion = protocolVersion
conf.ProtocolVersion = 0
conf.TrailingLogs = 10
c := MakeCluster(3, t, conf)
defer c.Close()
Expand Down Expand Up @@ -1453,12 +1453,6 @@ func testRecover(t *testing.T, protocolVersion int) {
c2.EnsureSamePeers(t)
}

func TestRaft_SnapshotRestore_PeerChange(t *testing.T) {
for v := ProtocolVersionMin; v <= ProtocolVersionMax; v++ {
testRecover(t, v)
}
}

func TestRaft_AutoSnapshot(t *testing.T) {
// Make the cluster
conf := inmemConfig(t)
Expand Down

0 comments on commit b4cb7e6

Please sign in to comment.