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(middleware-sdk-s3): add waiter for objects in s3 express e2e test #6061

Closed
wants to merge 1 commit into from

Conversation

siddsriv
Copy link
Contributor

@siddsriv siddsriv commented May 3, 2024

Issue

Internal JS-5161

Description

adds a waiter for objects to exist

Testing

 PASS  packages/middleware-sdk-s3/src/s3-express/middleware-s3-express.e2e.spec.ts (6.363 s)
  s3 express CRUD test suite
    ✓ can create a bucket (2 ms)
    ✓ can read/write/delete from a bucket (1 ms)
    ✓ can presign get (74 ms)
    ○ skipped can presign put

Test Suites: 1 passed, 1 total
Tests:       1 skipped, 3 passed, 4 total
Snapshots:   0 total
Time:        6.416 s
Ran all test suites matching /middleware-s3-express.e2e.spec.ts/i.

Additional context

Add any other context about the PR here.

Checklist

  • If you wrote E2E tests, are they resilient to concurrent I/O?

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

@siddsriv siddsriv requested a review from a team as a code owner May 3, 2024 19:45
@@ -77,7 +83,10 @@ describe("s3 express CRUD test suite", () => {
Bucket: bucketName,
Key: String(i),
})
.then((r) => r.Body?.transformToString())
.then(async (r) => {
await waitUntilObjectExists({ client: s3, maxWaitTime: 120 }, { Bucket: bucketName, Key: String(i) });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ObjectExists waiter should be added before calling getObject

@siddsriv
Copy link
Contributor Author

siddsriv commented May 3, 2024

closing this PR since Amazon S3 has strong consistency for objects. A waiter is probably not needed for objects here.

@siddsriv siddsriv closed this May 3, 2024
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 May 20, 2024
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.

None yet

2 participants