Skip to content

Conversation

@trivikr
Copy link
Member

@trivikr trivikr commented Jan 15, 2025

Issue

Internal JS-5678

Description

Changes chunk size in E2E tests to 8 KB.

From S3 documentation

The chunk size must be at least 8 KB. We recommend a chunk size of a least 64 KB for better performance. This chunk size applies to all chunks except the last one. The last chunk you send can be smaller than 8 KB. If your payload is small and can fit into one chunk, then it can be smaller than the 8 KB.

Testing

Before

$ client-s3> yarn test:e2e
...
 ❯ test/e2e/S3.e2e.spec.ts (8) 1905ms
   ❯ @aws-sdk/client-s3 (8) 1904ms
     ❯ PutObject (1)
       × should succeed with Node.js readable stream body
...
 FAIL  test/e2e/S3.e2e.spec.ts > @aws-sdk/client-s3 > PutObject > should succeed with Node.js readable stream body
InvalidChunkSizeError: Only the last chunk is allowed to have a size less than 8192 bytes
...
Test Files  1 failed (1)
     Tests  1 failed | 7 passed (8)

After

$ client-s3> yarn test:e2e
...
 Test Files  1 passed (1)
      Tests  8 passed (8)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@trivikr trivikr requested a review from a team as a code owner January 15, 2025 02:11
@trivikr trivikr merged commit c1a4254 into aws:main Jan 15, 2025
4 checks passed
@trivikr trivikr deleted the test-client-s3 branch January 15, 2025 08:24
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2025
@kuhe
Copy link
Contributor

kuhe commented Feb 18, 2025

using smaller chunks was enabled later by #6882 in an optional configuration field

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants