Skip to content

Commit

Permalink
TestMsgAppRespWaitReset
Browse files Browse the repository at this point in the history
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
  • Loading branch information
tbg committed Sep 20, 2022
1 parent ff837f3 commit b462fd1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions raft/raft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1424,14 +1424,14 @@ func TestRaftFreesReadOnlyMem(t *testing.T) {
// TestMsgAppRespWaitReset verifies the resume behavior of a leader
// MsgAppResp.
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.becomeLeader()

// The new leader has just emitted a new Term 4 entry; consume those messages
// from the outgoing queue.
sm.bcastAppend()
sm.readMessages()
// Run n1 which includes sending a message like the below
// one to n2, but also appending to its own log.
nextEnts(sm, s)

// Node 2 acks the first entry, making it committed.
sm.Step(pb.Message{
Expand Down

0 comments on commit b462fd1

Please sign in to comment.