Merge pull request #18202 from MadhavJivrajani/fix-vairable-access

tests/robustness: fix access of ChoiceWeight
This commit is contained in:
Marek Siarkowicz 2024-06-18 11:25:04 +02:00 committed by GitHub
commit 7dadc328f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -74,9 +74,9 @@ type etcdTraffic struct {
} }
func (t etcdTraffic) WithoutCompact() Traffic { 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 { for _, request := range t.requests {
if request.choice != Compact { if request.Choice != Compact {
requests = append(requests, request) requests = append(requests, request)
} }
} }

View File

@ -54,9 +54,9 @@ type kubernetesTraffic struct {
} }
func (t kubernetesTraffic) WithoutCompact() Traffic { 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 { for _, wc := range t.writeChoices {
if wc.choice != KubernetesCompact { if wc.Choice != KubernetesCompact {
wcs = append(wcs, wc) wcs = append(wcs, wc)
} }
} }