Skip to content

Commit

Permalink
FLAKEY_TEST: Add retry to outbound request for ProxyLifecycleShutdown…
Browse files Browse the repository at this point in the history
…Test
  • Loading branch information
NiniOak committed May 16, 2024
1 parent a7eabc0 commit b547902
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions acceptance/tests/connect/connect_proxy_lifecycle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b547902

Please sign in to comment.