Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(client-s3): use chunk size of 8 KB #6799

Merged
merged 1 commit into from
Jan 15, 2025
Merged

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
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
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