mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
TestLeaderTransferIgnoreProposal
Signed-off-by: Tobias Grieger <tobias.b.grieger@gmail.com>
This commit is contained in:
parent
182e1a371d
commit
fbe4d40086
@ -3655,13 +3655,17 @@ func TestLeaderTransferTimeout(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLeaderTransferIgnoreProposal(t *testing.T) {
|
||||
nt := newNetwork(nil, nil, nil)
|
||||
s := newTestMemoryStorage(withPeers(1, 2, 3))
|
||||
r := newTestRaft(1, 10, 1, s)
|
||||
nt := newNetwork(r, nil, nil)
|
||||
nt.send(pb.Message{From: 1, To: 1, Type: pb.MsgHup})
|
||||
|
||||
nt.isolate(3)
|
||||
|
||||
lead := nt.peers[1].(*raft)
|
||||
|
||||
nextEnts(r, s) // handle empty entry
|
||||
|
||||
// Transfer leadership to isolated node to let transfer pending, then send proposal.
|
||||
nt.send(pb.Message{From: 3, To: 1, Type: pb.MsgTransferLeader})
|
||||
if lead.leadTransferee != 3 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user