mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
TestNodePropose{,Config}
This test now observes the `MsgAppResp` injected in `(*raft).advance`. Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
This commit is contained in:
parent
87a9b80d7b
commit
1a81b27bed
@ -132,6 +132,10 @@ func TestNodeStepUnblock(t *testing.T) {
|
||||
func TestNodePropose(t *testing.T) {
|
||||
var msgs []raftpb.Message
|
||||
appendStep := func(r *raft, m raftpb.Message) error {
|
||||
t.Log(DescribeMessage(m, nil))
|
||||
if m.Type == raftpb.MsgAppResp {
|
||||
return nil // injected by (*raft).advance
|
||||
}
|
||||
msgs = append(msgs, m)
|
||||
return nil
|
||||
}
|
||||
@ -314,6 +318,9 @@ func TestNodeReadIndexToOldLeader(t *testing.T) {
|
||||
func TestNodeProposeConfig(t *testing.T) {
|
||||
var msgs []raftpb.Message
|
||||
appendStep := func(r *raft, m raftpb.Message) error {
|
||||
if m.Type == raftpb.MsgAppResp {
|
||||
return nil // injected by (*raft).advance
|
||||
}
|
||||
msgs = append(msgs, m)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user