raft: refine comment for doc and removed list tests

This commit is contained in:
Yicheng Qin 2014-09-29 19:54:20 -07:00
parent e4a6c9651a
commit 182c8316e1
2 changed files with 6 additions and 6 deletions

View File

@ -75,7 +75,7 @@ raftpb.EntryConfChange will be returned. You should apply it to node through:
cc.Unmarshal(data) cc.Unmarshal(data)
n.ApplyConfChange(cc) n.ApplyConfChange(cc)
Note: One ID represents one unique node in a cluster. A given ID MUST be used Note: An ID represents a unique node in a cluster. A given ID MUST be used
only once even if the old node has been removed. only once even if the old node has been removed.
*/ */

View File

@ -986,7 +986,7 @@ func TestRecoverDoublePendingConfig(t *testing.T) {
}() }()
} }
// TestAddNode tests that addNode could update pendingConf and peer list correctly. // TestAddNode tests that addNode could update pendingConf and nodes correctly.
func TestAddNode(t *testing.T) { func TestAddNode(t *testing.T) {
r := newRaft(1, []int64{1}, 0, 0) r := newRaft(1, []int64{1}, 0, 0)
r.pendingConf = true r.pendingConf = true
@ -1002,8 +1002,8 @@ func TestAddNode(t *testing.T) {
} }
} }
// TestRemoveNode tests that removeNode could update pendingConf, peer list, // TestRemoveNode tests that removeNode could update pendingConf, nodes and
// removed correctly. // and removed list correctly.
func TestRemoveNode(t *testing.T) { func TestRemoveNode(t *testing.T) {
r := newRaft(1, []int64{1, 2}, 0, 0) r := newRaft(1, []int64{1, 2}, 0, 0)
r.pendingConf = true r.pendingConf = true
@ -1021,8 +1021,8 @@ func TestRemoveNode(t *testing.T) {
} }
} }
// TestRecvMsgDenied tests that state machine sets removed when handling // TestRecvMsgDenied tests that state machine sets the removed list when
// msgDenied, and does not pass it to the actual stepX function. // handling msgDenied, and does not pass it to the actual stepX function.
func TestRecvMsgDenied(t *testing.T) { func TestRecvMsgDenied(t *testing.T) {
called := false called := false
fakeStep := func(r *raft, m pb.Message) { fakeStep := func(r *raft, m pb.Message) {