Skip to content

Commit 6b14571

Browse files
author
Ryan Lymburner
authored
Correct Failing E2E Tests (aws#703)
* Increase timeouts to address flaky E2E tests * Added custom retryer for RAM tests
1 parent b804505 commit 6b14571

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

test/suites/integration/access_log_policy_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ var _ = Describe("Access Log Policy", Ordered, func() {
8686
)
8787

8888
BeforeAll(func() {
89+
SetDefaultEventuallyTimeout(5 * time.Minute)
90+
SetDefaultEventuallyPollingInterval(10 * time.Second)
91+
8992
awsResourceName = awsResourceNamePrefix + utils.RandomAlphaString(10)
9093

9194
tags := testFramework.NewTestTags(testSuite)

test/suites/integration/grpcroute_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var _ = Describe("GRPCRoute test", Ordered, func() {
7070
g.Expect(len(rules)).To(Equal(1))
7171
g.Expect(*rules[0].Match.HttpMatch.Method).To(Equal("POST"))
7272
g.Expect(*rules[0].Match.HttpMatch.PathMatch.Match.Prefix).To(Equal("/"))
73-
}).Within(30 * time.Second).Should(Succeed())
73+
}).Within(1 * time.Minute).Should(Succeed())
7474
})
7575

7676
Context("Traffic test: client pod (grpcurl-runner) can send request to all services/methods of grpcBinService", func() {

test/suites/integration/ram_share_test.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package integration
22

33
import (
44
"fmt"
5+
awsClient "github.com/aws/aws-sdk-go/aws/client"
56
"os"
67
"strings"
78
"time"
@@ -50,7 +51,18 @@ var _ = Describe("RAM Share", Ordered, func() {
5051
BeforeAll(func() {
5152
secondaryTestRoleArn = os.Getenv("SECONDARY_ACCOUNT_TEST_ROLE_ARN")
5253

53-
primarySess := session.Must(session.NewSession(&aws.Config{Region: aws.String(config.Region)}))
54+
retryer := awsClient.DefaultRetryer{
55+
MinThrottleDelay: 1 * time.Second,
56+
MinRetryDelay: 1 * time.Second,
57+
MaxThrottleDelay: 5 * time.Second,
58+
MaxRetryDelay: 5 * time.Second,
59+
}
60+
61+
primarySess := session.Must(session.NewSession(&aws.Config{
62+
Region: aws.String(config.Region),
63+
Retryer: retryer,
64+
}))
65+
5466
stsClient := sts.New(primarySess)
5567
assumeRoleInput := &sts.AssumeRoleInput{
5668
RoleArn: aws.String(secondaryTestRoleArn),
@@ -63,7 +75,8 @@ var _ = Describe("RAM Share", Ordered, func() {
6375
creds := assumeRoleResult.Credentials
6476

6577
secondarySess := session.Must(session.NewSession(&aws.Config{
66-
Region: aws.String(config.Region),
78+
Region: aws.String(config.Region),
79+
Retryer: retryer,
6780
Credentials: credentials.NewStaticCredentials(
6881
*creds.AccessKeyId,
6982
*creds.SecretAccessKey,

0 commit comments

Comments
 (0)