mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: refine comment for doc and removed list tests
This commit is contained in:
parent
e4a6c9651a
commit
182c8316e1
@ -75,7 +75,7 @@ raftpb.EntryConfChange will be returned. You should apply it to node through:
|
||||
cc.Unmarshal(data)
|
||||
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.
|
||||
|
||||
*/
|
||||
|
@ -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) {
|
||||
r := newRaft(1, []int64{1}, 0, 0)
|
||||
r.pendingConf = true
|
||||
@ -1002,8 +1002,8 @@ func TestAddNode(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestRemoveNode tests that removeNode could update pendingConf, peer list,
|
||||
// removed correctly.
|
||||
// TestRemoveNode tests that removeNode could update pendingConf, nodes and
|
||||
// and removed list correctly.
|
||||
func TestRemoveNode(t *testing.T) {
|
||||
r := newRaft(1, []int64{1, 2}, 0, 0)
|
||||
r.pendingConf = true
|
||||
@ -1021,8 +1021,8 @@ func TestRemoveNode(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// TestRecvMsgDenied tests that state machine sets removed when handling
|
||||
// msgDenied, and does not pass it to the actual stepX function.
|
||||
// TestRecvMsgDenied tests that state machine sets the removed list when
|
||||
// handling msgDenied, and does not pass it to the actual stepX function.
|
||||
func TestRecvMsgDenied(t *testing.T) {
|
||||
called := false
|
||||
fakeStep := func(r *raft, m pb.Message) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user