mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #1695 from xiang90/nodestart
raft: add comment string for TestNodeStart
This commit is contained in:
commit
0772987128
@ -143,7 +143,7 @@ type Peer struct {
|
||||
|
||||
// StartNode returns a new Node given a unique raft id, a list of raft peers, and
|
||||
// the election and heartbeat timeouts in units of ticks.
|
||||
// It also builds ConfChangeAddNode entry for each peer and puts them at the head of the log.
|
||||
// It appends a ConfChangeAddNode entry for each given peer to the initial log.
|
||||
func StartNode(id uint64, peers []Peer, election, heartbeat int) Node {
|
||||
n := newNode()
|
||||
r := newRaft(id, nil, election, heartbeat)
|
||||
|
@ -161,7 +161,10 @@ func TestReadyContainUpdates(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestNode(t *testing.T) {
|
||||
// TestNodeStart ensures that a node can be started correctly. The node should
|
||||
// start with correct configuration change entries, and can accept and commit
|
||||
// proposals.
|
||||
func TestNodeStart(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user