Skip to content

Commit 5a816f9

Browse files
authored
test(middleware-sdk-s3): increase timeout in E2E test (#5353)
* test(middleware-sdk-s3): increase timeout in E2E test * test(middleware-sdk-s3): move timeout to top of file * test(middleware-sdk-s3): remove redundant timeouts for each case
1 parent fc15e05 commit 5a816f9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/middleware-sdk-s3/src/region-redirect-middleware.e2e.spec.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { S3 } from "@aws-sdk/client-s3";
22
import { GetCallerIdentityCommandOutput, STS } from "@aws-sdk/client-sts";
33

4+
jest.setTimeout(100000);
5+
46
const testValue = "Hello S3 global client!";
57

68
describe("S3 Global Client Test", () => {
@@ -21,7 +23,6 @@ describe("S3 Global Client Test", () => {
2123
const randId = alphabet[(Math.random() * alphabet.length) | 0] + alphabet[(Math.random() * alphabet.length) | 0];
2224

2325
beforeAll(async () => {
24-
jest.setTimeout(60000);
2526
callerID = await stsClient.getCallerIdentity({});
2627
bucketNames = regionConfigs.map((config) => `${callerID.Account}-${randId}-redirect-${config.region}`);
2728
await Promise.all(bucketNames.map((bucketName, index) => deleteBucket(s3Clients[index], bucketName)));
@@ -40,7 +41,7 @@ describe("S3 Global Client Test", () => {
4041
await s3Client.putObject({ Bucket: bucketName, Key: objKey, Body: testValue });
4142
}
4243
}
43-
}, 60000);
44+
});
4445

4546
it("Should be able to get objects following region redirect", async () => {
4647
// Fetch and assert objects
@@ -52,7 +53,7 @@ describe("S3 Global Client Test", () => {
5253
expect(data).toEqual(testValue);
5354
}
5455
}
55-
}, 60000);
56+
});
5657

5758
it("Should delete objects following region redirect", async () => {
5859
for (const bucketName of bucketNames) {
@@ -61,7 +62,7 @@ describe("S3 Global Client Test", () => {
6162
await s3Client.deleteObject({ Bucket: bucketName, Key: objKey });
6263
}
6364
}
64-
}, 60000);
65+
});
6566
});
6667

6768
async function deleteBucket(s3: S3, bucketName: string) {

0 commit comments

Comments
 (0)