raftpb: clean up naming in ConfChange

This commit is contained in:
Tobias Schottdorf
2019-07-23 00:34:46 +02:00
parent b67303c6a2
commit b9c051e7a7
15 changed files with 186 additions and 173 deletions

View File

@@ -691,7 +691,7 @@ func TestNodeRestart(t *testing.T) {
func TestNodeRestartFromSnapshot(t *testing.T) {
snap := raftpb.Snapshot{
Metadata: raftpb.SnapshotMetadata{
ConfState: raftpb.ConfState{Nodes: []uint64{1, 2}},
ConfState: raftpb.ConfState{Voters: []uint64{1, 2}},
Index: 2,
Term: 1,
},
@@ -845,7 +845,7 @@ func TestNodeProposeAddLearnerNode(t *testing.T) {
t.Errorf("apply conf change should return new added learner: %v", state.String())
}
if len(state.Nodes) != 1 {
if len(state.Voters) != 1 {
t.Errorf("add learner should not change the nodes: %v", state.String())
}
t.Logf("apply raft conf %v changed to: %v", cc, state.String())