Skip to content

chore: allow opt-out of test.concurrent in integ tests#19402

Merged
mergify[bot] merged 2 commits intomasterfrom
rmuller/yarn-integ-test
Mar 15, 2022
Merged

chore: allow opt-out of test.concurrent in integ tests#19402
mergify[bot] merged 2 commits intomasterfrom
rmuller/yarn-integ-test

Conversation

@RomainMuller
Copy link
Copy Markdown
Contributor

The test.concurrent feature of jest immediately executes the test
code in order to obtain a Promise that is checked as part of the test
run.

This means that the test handler code runs whether the test is included
or not in the assessment, as controlled by the -t flag of jest.

In order to allow integration tests to selectively run only a subset of
the tests, we must hence not use test.concurrent, or else all test
handlers run fully, leading to unwanted side effects.

This is needed in order to be able to complete cdklabs/cdk-ops#1922.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

The `test.concurrent` feature of `jest` immediately executes the test
code in order to obtain a `Promise` that is checked as part of the test
run.

This means that the test handler code runs whether the test is included
or not in the assessment, as controlled by the `-t` flag of jest.

In order to allow integration tests to selectively run only a subset of
the tests, we must hence not use `test.concurrent`, or else all test
handlers run fully, leading to unwanted side effects.

This is needed in order to be able to complete cdklabs/cdk-ops#1922.
@RomainMuller RomainMuller self-assigned this Mar 15, 2022
@gitpod-io
Copy link
Copy Markdown

gitpod-io bot commented Mar 15, 2022

@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Mar 15, 2022
"lib/init-templates/**/typescript/**/*.ts"
]
],
"references": [
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

How did this happen?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I wrote those. They were missing. They made my DX better :)

Co-authored-by: Eli Polonsky <epolon@amazon.com>
@RomainMuller RomainMuller requested review from iliapolo and removed request for skinny85 March 15, 2022 17:28
@aws-cdk-automation
Copy link
Copy Markdown
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: be13212
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 15, 2022

Thank you for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 3866213 into master Mar 15, 2022
@mergify mergify bot deleted the rmuller/yarn-integ-test branch March 15, 2022 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution/core This is a PR that came from AWS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants