diff --git a/test/e2e/kube-ovn/switch_lb_rule/switch_lb_rule.go b/test/e2e/kube-ovn/switch_lb_rule/switch_lb_rule.go index c168e6e636a5..bb8ee7f14d96 100644 --- a/test/e2e/kube-ovn/switch_lb_rule/switch_lb_rule.go +++ b/test/e2e/kube-ovn/switch_lb_rule/switch_lb_rule.go @@ -366,7 +366,7 @@ var _ = framework.Describe("[group:slr]", func() { } for _, port := range epPorts { framework.ExpectContainElement(tps, port.TargetPort) - framework.ExpectEqual(protocols[port.TargetPort], port.Protocol) + framework.ExpectHaveKeyWithValue(protocols, port.TargetPort, port.Protocol) } } ginkgo.By("Checking endpoint switch lb service " + epSvc.Name)