Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"source.fixAll.eslint": "explicit"
},
"typescript.tsdk": "node_modules/typescript/lib",
"vitest.disableWorkspaceWarning": true
"vitest.disableWorkspaceWarning": true,
"java.configuration.updateBuildConfiguration": "interactive"
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@ describe(S3TransferManager.name, () => {
let region: string;

beforeAll(async () => {
// const integTestResourcesEnv = await getIntegTestResources();
// Object.assign(process.env, integTestResourcesEnv);
const integTestResourcesEnv = await getIntegTestResources();
Object.assign(process.env, integTestResourcesEnv);

// region = process?.env?.AWS_SMOKE_TEST_REGION as string;
// Bucket = process?.env?.AWS_SMOKE_TEST_BUCKET as string;
region = process?.env?.AWS_SMOKE_TEST_REGION as string;
Bucket = process?.env?.AWS_SMOKE_TEST_BUCKET as string;
void getIntegTestResources;

region = "us-west-2";
Bucket = "lukachad-us-west-2";

client = new S3({
region,
});
Expand All @@ -54,7 +51,7 @@ describe(S3TransferManager.name, () => {
});
}, 120_000);

describe.skip("multi part download", () => {
describe("multi part download", () => {
const modes = ["PART", "RANGE"] as S3TransferManagerConfig["multipartDownloadType"][];
const sizes = [6, 11] as number[];

Expand Down Expand Up @@ -92,13 +89,11 @@ describe(S3TransferManager.name, () => {
},
{
eventListeners: {
transferInitiated: [({ request, snapshot }) => {}],
bytesTransferred: [
({ request, snapshot }) => {
bytesTransferred = snapshot.transferredBytes;
},
],
transferComplete: [({ request, snapshot, response }) => {}],
},
}
);
Expand Down Expand Up @@ -151,7 +146,7 @@ describe(S3TransferManager.name, () => {
const serialized = await download.Body?.transformToString();
check(serialized);
if (partNumber) {
expect(serialized?.length).toEqual(DEFAULT_PART_SIZE);
expect(serialized?.length).toEqual(4 * 1024 * 1024); // Part 1 is 8MB Part 2 is 4MB
} else {
expect(serialized?.length).toEqual(Body.length);
}
Expand All @@ -163,10 +158,11 @@ describe(S3TransferManager.name, () => {
it("multipart object: multipartDownloadType = RANGE, range = 0-12MB, partNumber = null", async () => {
await sepTests("multipart", "RANGE", `bytes=0-${12 * 1024 * 1024}`, undefined);
}, 60_000);
it("single object: multipartDownloadType = PART, range = null, partNumber = 2", async () => {
// skipped because TM no longer supports partNumber
it.skip("single object: multipartDownloadType = PART, range = null, partNumber = 2", async () => {
await sepTests("single", "PART", undefined, 2);
}, 60_000);
it("single object: multipartDownloadType = RANGE, range = null, partNumber = 2", async () => {
it.skip("single object: multipartDownloadType = RANGE, range = null, partNumber = 2", async () => {
await sepTests("single", "RANGE", undefined, 2);
}, 60_000);
it("single object: multipartDownloadType = PART, range = null, partNumber = null", async () => {
Expand Down
Loading