mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: fix tiny mistake of message type
This commit is contained in:
parent
4ee60d6671
commit
ff9d16a2e0
@ -873,8 +873,8 @@ func TestHandleHeartbeat(t *testing.T) {
|
|||||||
m pb.Message
|
m pb.Message
|
||||||
wCommit uint64
|
wCommit uint64
|
||||||
}{
|
}{
|
||||||
{pb.Message{From: 2, To: 1, Type: pb.MsgApp, Term: 2, Commit: commit + 1}, commit + 1},
|
{pb.Message{From: 2, To: 1, Type: pb.MsgHeartbeat, Term: 2, Commit: commit + 1}, commit + 1},
|
||||||
{pb.Message{From: 2, To: 1, Type: pb.MsgApp, Term: 2, Commit: commit - 1}, commit}, // do not decrease commit
|
{pb.Message{From: 2, To: 1, Type: pb.MsgHeartbeat, Term: 2, Commit: commit - 1}, commit}, // do not decrease commit
|
||||||
}
|
}
|
||||||
|
|
||||||
for i, tt := range tests {
|
for i, tt := range tests {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user