mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
TestNodeProposeWaitDropped
The test just needs to ignore the MsgAppResp. Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
This commit is contained in:
parent
1a81b27bed
commit
873cdf3fa6
@ -479,6 +479,10 @@ func TestNodeProposeWaitDropped(t *testing.T) {
|
|||||||
t.Logf("dropping message: %v", m.String())
|
t.Logf("dropping message: %v", m.String())
|
||||||
return ErrProposalDropped
|
return ErrProposalDropped
|
||||||
}
|
}
|
||||||
|
if m.Type == raftpb.MsgAppResp {
|
||||||
|
// This is produced by raft internally, see (*raft).advance.
|
||||||
|
return nil
|
||||||
|
}
|
||||||
msgs = append(msgs, m)
|
msgs = append(msgs, m)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -511,7 +515,7 @@ func TestNodeProposeWaitDropped(t *testing.T) {
|
|||||||
|
|
||||||
n.Stop()
|
n.Stop()
|
||||||
if len(msgs) != 0 {
|
if len(msgs) != 0 {
|
||||||
t.Fatalf("len(msgs) = %d, want %d", len(msgs), 1)
|
t.Fatalf("len(msgs) = %d, want %d", len(msgs), 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user