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): only delete the s3-express bucket created by the test #6077

Merged
merged 3 commits into from May 8, 2024

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented May 8, 2024

Issue

Internal JS-5161

Description

Deletes only the s3-express bucket created by the test

Testing

Run middleware-s3-express.e2e.spec.ts test 3 times in parallel.

Before

The tests fail, as they try to delete buckets in use by other tests.

$ yarn test:e2e src/s3-express/middleware-s3-express.e2e.spec.ts & yarn test:e2e src/s3-express/middleware-s3-express.e2e.spec.ts & yarn test:e2e src/s3-express/middleware-s3-express.e2e.spec.ts
...
  ● s3 express CRUD test suite › can presign put

    OperationAborted: A conflicting conditional operation is currently in progress against this resource. Please try again.

      4754 |     default:
      4755 |       const parsedBody = parsedOutput.body;
    > 4756 |       return throwDefaultError({
           |              ^
      4757 |         output,
      4758 |         parsedBody,
      4759 |         errorCode
...

After

The tests succeed, as they only delete the bucket created by the test itself.

$ yarn test:e2e src/s3-express/middleware-s3-express.e2e.spec.ts & yarn test:e2e src/s3-express/middleware-s3-express.e2e.spec.ts & yarn test:e2e src/s3-express/middleware-s3-express.e2e.spec.ts
...
Ran all test suites matching /src\/s3-express\/middleware-s3-express.e2e.spec.ts/i.
Done in 9.73s.
[1]  - done       yarn test:e2e src/s3-express/middleware-s3-express.e2e.spec.ts
Done in 9.71s.
[2]  + done       yarn test:e2e src/s3-express/middleware-s3-express.e2e.spec.ts
Done in 9.76s.

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.

@trivikr trivikr requested a review from a team as a code owner May 8, 2024 16:44
@trivikr trivikr merged commit 20dd731 into aws:main May 8, 2024
3 checks passed
@trivikr trivikr deleted the middleware-s3-express branch May 8, 2024 16:48
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 23, 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