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

[jest] use circus runner for the integration tests #102782

Merged
merged 8 commits into from
Jun 22, 2021

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Jun 21, 2021

Summary

I spent a lot of time debugging Jest did not exit one second after the test run has completed in my integration tests. It’s turned out an exception, thrown from the afterAll lifecycle, interrupts the cleanup logic, but didn't appear in the logs.
It seems to be a jest problem, that can be fixed by switching to jest-circus/runner.
Note, that jest-circus/runner will be the default runner from jest@v27. We will have to fix other jasmine2 occurrences in the codebase later.

@mshustov mshustov added Team:Operations Team label for Operations Team release_note:skip Skip the PR/issue when compiling release notes labels Jun 21, 2021
// prevents the server to respond
await delay(30000);
return res.ok({ body: 'ok' });
const done = new Promise<void>((resolve) => {
Copy link
Contributor Author

@mshustov mshustov Jun 22, 2021

Choose a reason for hiding this comment

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

promise + callback style API are not supported simultaneously jestjs/jest#10529
So I didn't migrate core unit tests to circus.

@mshustov mshustov marked this pull request as ready for review June 22, 2021 07:05
@mshustov mshustov requested a review from a team as a code owner June 22, 2021 07:05
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@mshustov mshustov added v7.14.0 v8.0.0 auto-backport Deprecated - use backport:version if exact versions are needed chore labels Jun 22, 2021
@mshustov mshustov requested a review from a team June 22, 2021 07:06
@mshustov mshustov changed the title use circus runner for integration tests [jest] use circus runner for the integration tests Jun 22, 2021
Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

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

LGTM

@mshustov mshustov enabled auto-merge (squash) June 22, 2021 07:32
@mshustov
Copy link
Contributor Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@mshustov mshustov merged commit 2323b98 into elastic:master Jun 22, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Jun 22, 2021
* use circus runner for integration tests

* do not use done callback. jestjs/jest#10529

* fix type error
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

@mshustov mshustov deleted the use-circus-for-intergration-tests branch June 22, 2021 15:52
kibanamachine added a commit that referenced this pull request Jun 22, 2021
…102948)

* [jest] use circus runner for the integration tests (#102782)

* use circus runner for integration tests

* do not use done callback. jestjs/jest#10529

* fix type error

* disable reporting for so 100k migration

Co-authored-by: Mikhail Shustov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed chore release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants