mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
TestMsgAppRespWaitReset
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
This commit is contained in:
parent
ff837f3a0b
commit
b462fd15c2
@ -1424,14 +1424,14 @@ func TestRaftFreesReadOnlyMem(t *testing.T) {
|
|||||||
// TestMsgAppRespWaitReset verifies the resume behavior of a leader
|
// TestMsgAppRespWaitReset verifies the resume behavior of a leader
|
||||||
// MsgAppResp.
|
// MsgAppResp.
|
||||||
func TestMsgAppRespWaitReset(t *testing.T) {
|
func TestMsgAppRespWaitReset(t *testing.T) {
|
||||||
sm := newTestRaft(1, 5, 1, newTestMemoryStorage(withPeers(1, 2, 3)))
|
s := newTestMemoryStorage(withPeers(1, 2, 3))
|
||||||
|
sm := newTestRaft(1, 5, 1, s)
|
||||||
sm.becomeCandidate()
|
sm.becomeCandidate()
|
||||||
sm.becomeLeader()
|
sm.becomeLeader()
|
||||||
|
|
||||||
// The new leader has just emitted a new Term 4 entry; consume those messages
|
// Run n1 which includes sending a message like the below
|
||||||
// from the outgoing queue.
|
// one to n2, but also appending to its own log.
|
||||||
sm.bcastAppend()
|
nextEnts(sm, s)
|
||||||
sm.readMessages()
|
|
||||||
|
|
||||||
// Node 2 acks the first entry, making it committed.
|
// Node 2 acks the first entry, making it committed.
|
||||||
sm.Step(pb.Message{
|
sm.Step(pb.Message{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user