mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: specify voters and learners via snapshot
This commit is contained in:
@@ -25,7 +25,7 @@ import (
|
||||
// 2. when the window is full, no more msgApp can be sent.
|
||||
|
||||
func TestMsgAppFlowControlFull(t *testing.T) {
|
||||
r := newTestRaft(1, []uint64{1, 2}, 5, 1, NewMemoryStorage())
|
||||
r := newTestRaft(1, 5, 1, newTestMemoryStorage(withPeers(1, 2)))
|
||||
r.becomeCandidate()
|
||||
r.becomeLeader()
|
||||
|
||||
@@ -61,7 +61,7 @@ func TestMsgAppFlowControlFull(t *testing.T) {
|
||||
// 1. valid msgAppResp.index moves the windows to pass all smaller or equal index.
|
||||
// 2. out-of-dated msgAppResp has no effect on the sliding window.
|
||||
func TestMsgAppFlowControlMoveForward(t *testing.T) {
|
||||
r := newTestRaft(1, []uint64{1, 2}, 5, 1, NewMemoryStorage())
|
||||
r := newTestRaft(1, 5, 1, newTestMemoryStorage(withPeers(1, 2)))
|
||||
r.becomeCandidate()
|
||||
r.becomeLeader()
|
||||
|
||||
@@ -106,7 +106,7 @@ func TestMsgAppFlowControlMoveForward(t *testing.T) {
|
||||
// TestMsgAppFlowControlRecvHeartbeat ensures a heartbeat response
|
||||
// frees one slot if the window is full.
|
||||
func TestMsgAppFlowControlRecvHeartbeat(t *testing.T) {
|
||||
r := newTestRaft(1, []uint64{1, 2}, 5, 1, NewMemoryStorage())
|
||||
r := newTestRaft(1, 5, 1, newTestMemoryStorage(withPeers(1, 2)))
|
||||
r.becomeCandidate()
|
||||
r.becomeLeader()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user