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

[keystore] Fix openHandle in Jest tests #96671

Merged
merged 2 commits into from
Apr 13, 2021

Conversation

tylersmalley
Copy link
Contributor

@tylersmalley tylersmalley commented Apr 8, 2021

Resolves an issue where there are open handles present in the Keystore CLI unit tests.

  • Removes usage of sinon
  • Awaits all promises.
[2021-04-07T00:19:27Z] Jest did not exit one second after the test run has completed.
[2021-04-07T00:19:27Z]
[2021-04-07T00:19:27Z] This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.

```
[2021-04-07T00:19:27Z] Jest did not exit one second after the test run has completed.
[2021-04-07T00:19:27Z]
[2021-04-07T00:19:27Z] This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
```

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
@tylersmalley
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

@tylersmalley tylersmalley added auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.13.0 v8.0.0 labels Apr 12, 2021
@tylersmalley tylersmalley marked this pull request as ready for review April 12, 2021 23:00
@elasticmachine
Copy link
Contributor

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

Copy link
Member

@jbudz jbudz left a comment

Choose a reason for hiding this comment

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

~/dev/kibana(pr/96671*) » node scripts/jest src/cli_keystore                                     jon@xps
 info yarn jest src/cli_keystore --config /home/jon/dev/kibana/src/cli_keystore/jest.config.js
 PASS  src/cli_keystore/utils/prompt.test.js
 PASS  src/cli_keystore/get_keystore.test.js (5.394 s)
 PASS  src/cli_keystore/list.test.js (5.422 s)
 PASS  src/cli_keystore/remove.test.js (5.447 s)
 PASS  src/cli_keystore/create.test.js (5.506 s)
 PASS  src/cli_keystore/add.test.js (5.613 s)

Test Suites: 6 passed, 6 total
Tests:       29 passed, 29 total
Snapshots:   0 total
Time:        7.381 s
Ran all test suites matching /src\/cli_keystore/i.

LGTM

@tylersmalley tylersmalley merged commit 22dd61d into elastic:master Apr 13, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Apr 13, 2021
```
[2021-04-07T00:19:27Z] Jest did not exit one second after the test run has completed.
[2021-04-07T00:19:27Z]
[2021-04-07T00:19:27Z] This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
```

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Apr 13, 2021
```
[2021-04-07T00:19:27Z] Jest did not exit one second after the test run has completed.
[2021-04-07T00:19:27Z]
[2021-04-07T00:19:27Z] This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
```

Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Tyler Smalley <tyler.smalley@elastic.co>
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 release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants