mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #18202 from MadhavJivrajani/fix-vairable-access
tests/robustness: fix access of ChoiceWeight
This commit is contained in:
commit
7dadc328f3
@ -74,9 +74,9 @@ type etcdTraffic struct {
|
||||
}
|
||||
|
||||
func (t etcdTraffic) WithoutCompact() Traffic {
|
||||
requests := make([]choiceWeight[etcdRequestType], 0, len(t.requests))
|
||||
requests := make([]random.ChoiceWeight[etcdRequestType], 0, len(t.requests))
|
||||
for _, request := range t.requests {
|
||||
if request.choice != Compact {
|
||||
if request.Choice != Compact {
|
||||
requests = append(requests, request)
|
||||
}
|
||||
}
|
||||
|
@ -54,9 +54,9 @@ type kubernetesTraffic struct {
|
||||
}
|
||||
|
||||
func (t kubernetesTraffic) WithoutCompact() Traffic {
|
||||
wcs := make([]choiceWeight[KubernetesRequestType], 0, len(t.writeChoices))
|
||||
wcs := make([]random.ChoiceWeight[KubernetesRequestType], 0, len(t.writeChoices))
|
||||
for _, wc := range t.writeChoices {
|
||||
if wc.choice != KubernetesCompact {
|
||||
if wc.Choice != KubernetesCompact {
|
||||
wcs = append(wcs, wc)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user