diff --git a/conformance/tests/httproute-matching-across-routes.go b/conformance/tests/httproute-matching-across-routes.go index 3667c98aa7..bd7b259ffe 100644 --- a/conformance/tests/httproute-matching-across-routes.go +++ b/conformance/tests/httproute-matching-across-routes.go @@ -80,7 +80,7 @@ var HTTPRouteMatchingAcrossRoutes = suite.ConformanceTest{ Namespace: ns, }, { Request: http.ExpectedRequest{ - // v2 matches are limited to *.com + // v2 matches are limited to example.com Host: "example.net", Path: "/v2", }, @@ -103,7 +103,10 @@ var HTTPRouteMatchingAcrossRoutes = suite.ConformanceTest{ Namespace: ns, }} - for i, tc := range testCases { + for i := range testCases { + // Declare tc here to avoid loop variable + // reuse issues across parallel tests. + tc := testCases[i] t.Run(testName(tc, i), func(t *testing.T) { t.Parallel() http.MakeRequestAndExpectResponse(t, suite.RoundTripper, gwAddr, tc) diff --git a/conformance/tests/httproute-matching-across-routes.yaml b/conformance/tests/httproute-matching-across-routes.yaml index 36e2669284..013630519c 100644 --- a/conformance/tests/httproute-matching-across-routes.yaml +++ b/conformance/tests/httproute-matching-across-routes.yaml @@ -28,7 +28,7 @@ metadata: namespace: gateway-conformance-infra spec: hostnames: - - "*.com" + - example.com parentRefs: - name: same-namespace rules: diff --git a/conformance/tests/httproute-matching.go b/conformance/tests/httproute-matching.go index 36d1e0bb0d..7fc404fc8e 100644 --- a/conformance/tests/httproute-matching.go +++ b/conformance/tests/httproute-matching.go @@ -66,7 +66,10 @@ var HTTPRouteMatching = suite.ConformanceTest{ Namespace: ns, }} - for i, tc := range testCases { + for i := range testCases { + // Declare tc here to avoid loop variable + // reuse issues across parallel tests. + tc := testCases[i] t.Run(testName(tc, i), func(t *testing.T) { t.Parallel() http.MakeRequestAndExpectResponse(t, suite.RoundTripper, gwAddr, tc) diff --git a/conformance/utils/kubernetes/helpers.go b/conformance/utils/kubernetes/helpers.go index fdf371ca51..b0df4aaa4f 100644 --- a/conformance/utils/kubernetes/helpers.go +++ b/conformance/utils/kubernetes/helpers.go @@ -91,7 +91,8 @@ func NamespacesMustBeReady(t *testing.T, c client.Client, namespaces []string, s t.Errorf("Error listing Pods: %v", err) } for _, pod := range podList.Items { - if !findPodConditionInList(t, pod.Status.Conditions, "Ready", "True") { + if !findPodConditionInList(t, pod.Status.Conditions, "Ready", "True") && + pod.Status.Phase != v1.PodSucceeded { t.Logf("%s/%s Pod not ready yet", ns, pod.Name) return false, nil }