mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
rafthttp: fix TestUpdateMember
Before this PR, it may error like this: ``` --- FAIL: TestUpdateMember-2 (0.00s) server_test.go:950: action = [{ApplyConfChange:ConfChangeUpdateNode []} {ProposeConfChange:ConfChangeUpdateNode []}], want [{ProposeConfChange:ConfChangeUpdateNode []} {ApplyConfChange:ConfChangeUpdateNode []}] ``` This fixes the test by recording the proposal event in time.
This commit is contained in:
parent
cd629c9b44
commit
1af2b4cad7
@ -1349,8 +1349,8 @@ func (n *nodeConfChangeCommitterRecorder) ProposeConfChange(ctx context.Context,
|
||||
return err
|
||||
}
|
||||
n.index++
|
||||
n.readyc <- raft.Ready{CommittedEntries: []raftpb.Entry{{Index: n.index, Type: raftpb.EntryConfChange, Data: data}}}
|
||||
n.Record(testutil.Action{Name: "ProposeConfChange:" + conf.Type.String()})
|
||||
n.readyc <- raft.Ready{CommittedEntries: []raftpb.Entry{{Index: n.index, Type: raftpb.EntryConfChange, Data: data}}}
|
||||
return nil
|
||||
}
|
||||
func (n *nodeConfChangeCommitterRecorder) Ready() <-chan raft.Ready {
|
||||
|
Loading…
x
Reference in New Issue
Block a user