diff --git a/acceptance/tests/api-gateway/api_gateway_gatewayclassconfig_test.go b/acceptance/tests/api-gateway/api_gateway_gatewayclassconfig_test.go index 89ba07a1e7..14ef0e0035 100644 --- a/acceptance/tests/api-gateway/api_gateway_gatewayclassconfig_test.go +++ b/acceptance/tests/api-gateway/api_gateway_gatewayclassconfig_test.go @@ -138,7 +138,7 @@ func TestAPIGateway_GatewayClassConfig(t *testing.T) { checkConsulExists(t, consulClient, api.APIGateway, gatewayName) // Scenario: Gateway deployment should match the default instances defined on the gateway class config - logger.Log(t, "checking that gateway instances match defined gateway class config") + // checking that gateway instances match defined gateway class config checkNumberOfInstances(t, k8sClient, consulClient, gateway.Name, gateway.Namespace, defaultInstances, gateway) // Scenario: Updating the GatewayClassConfig should not affect gateways that have already been created @@ -177,7 +177,7 @@ func scale(t *testing.T, client client.Client, name, namespace string, scaleTo * func checkNumberOfInstances(t *testing.T, k8client client.Client, consulClient *api.Client, name, namespace string, wantNumber *int32, gateway *gwv1beta1.Gateway) { t.Helper() - retryCheckWithWait(t, 30, 10*time.Second, func(r *retry.R) { + retryCheckWithWait(t, 40, 10*time.Second, func(r *retry.R) { logger.Log(t, "checking that gateway instances match defined gateway class config") logger.Log(t, fmt.Sprintf("want: %d", *wantNumber)) diff --git a/acceptance/tests/connect/connect_proxy_lifecycle_test.go b/acceptance/tests/connect/connect_proxy_lifecycle_test.go index 95502c9869..22f7b5c53f 100644 --- a/acceptance/tests/connect/connect_proxy_lifecycle_test.go +++ b/acceptance/tests/connect/connect_proxy_lifecycle_test.go @@ -163,9 +163,17 @@ func TestConnectInject_ProxyLifecycleShutdown(t *testing.T) { case <-gracePeriodTimer.C: break gracePeriodLoop default: - output, err := k8s.RunKubectlAndGetOutputE(t, ctx.KubectlOptions(t), args...) - require.NoError(t, err) - require.True(t, !strings.Contains(output, "curl: (7) Failed to connect")) + retrier := &retry.Counter{Count: 3, Wait: 1 * time.Second} + retry.RunWith(retrier, t, func(r *retry.R) { + output, err := k8s.RunKubectlAndGetOutputE(r, ctx.KubectlOptions(t), args...) + if err != nil { + r.Errorf(err.Error()) + return + } + require.Condition(r, func() bool { + return !strings.Contains(output, "curl: (7) Failed to connect") + }, fmt.Sprintf("Error: %s", output)) + }) // If listener draining is disabled, ensure inbound // requests are accepted during grace period.