mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test: fix unit test Instability
When two members in a 5 member cluster are corrupted, and they have different hashes, etcd will raise alarm for both members, but the order isn't guaranteed. But if the two corrupted members have the same hash, then the order is guaranteed. The leader always raise alarm in the same order as the member list. Signed-off-by: Benjamin Wang <wachao@vmware.com>
This commit is contained in:
parent
319651b784
commit
fae9435b66
@ -269,7 +269,7 @@ func TestCompactHashCheck(t *testing.T) {
|
||||
{peerInfo: peerInfo{id: 42}, resp: &pb.HashKVResponse{CompactRevision: 1, Hash: 2}},
|
||||
{peerInfo: peerInfo{id: 43}, resp: &pb.HashKVResponse{CompactRevision: 1, Hash: 2}},
|
||||
{peerInfo: peerInfo{id: 44}, resp: &pb.HashKVResponse{CompactRevision: 1, Hash: 7}},
|
||||
{peerInfo: peerInfo{id: 45}, resp: &pb.HashKVResponse{CompactRevision: 1, Hash: 8}},
|
||||
{peerInfo: peerInfo{id: 45}, resp: &pb.HashKVResponse{CompactRevision: 1, Hash: 7}},
|
||||
},
|
||||
},
|
||||
expectActions: []string{"MemberId()", "ReqTimeout()", "Hashes()", "PeerHashByRev(2)", "MemberId()", "TriggerCorruptAlarm(44)", "TriggerCorruptAlarm(45)"},
|
||||
|
Loading…
x
Reference in New Issue
Block a user