tests/robustness: fix access of ChoiceWeight

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
This commit is contained in:
Madhav Jivrajani 2024-06-18 13:44:40 +05:30
parent c70e0e4f55
commit 5c2422ba05
2 changed files with 4 additions and 4 deletions

View File

@ -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)
}
}

View File

@ -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)
}
}