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

Fix unhandled promise rejection #114233

Conversation

MiriamAparicio
Copy link
Contributor

Closes #112895

Summary

The test x-pack/plugins/apm/public/components/routing/templates/settings_template.test.tsx contains unhandled promise rejections and causes the process to exit in Node 16 (upgrade pending).
All promise rejections should therefore be handled.

What was done

  • fix the test
  • clean other warnings

@MiriamAparicio MiriamAparicio added release_note:fix auto-backport Deprecated - use backport:version if exact versions are needed v7.16.0 labels Oct 7, 2021
@MiriamAparicio MiriamAparicio requested review from a team as code owners October 7, 2021 08:06
@botelastic botelastic bot added Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability labels Oct 7, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@MiriamAparicio
Copy link
Contributor Author

@elasticmachine merge upstream

@MiriamAparicio MiriamAparicio force-pushed the fix-tests-handle-promise-rejections branch from 4a136ee to 06e16e4 Compare October 7, 2021 10:42
setPopoverIsOpen={setIsPopoverOpen}
onApply={jest.fn()}
/>
</IntlProvider>
Copy link
Member

Choose a reason for hiding this comment

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

Was this needed to run the apm jest tests?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It was triggering a warning error

setPopoverIsOpen={setIsPopoverOpen}
onApply={jest.fn()}
/>
<IntlProvider locale="en">
Copy link
Contributor

Choose a reason for hiding this comment

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

we can move this wrapper to the render method in '../../utils/test_helper'

Copy link
Contributor

@shahzad31 shahzad31 left a comment

Choose a reason for hiding this comment

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

Uptime changes LGTM !!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

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

@MiriamAparicio MiriamAparicio merged commit a7fd1e2 into elastic:master Oct 7, 2021
@MiriamAparicio MiriamAparicio deleted the fix-tests-handle-promise-rejections branch October 7, 2021 13:18
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 7, 2021
kibanamachine added a commit that referenced this pull request Oct 7, 2021
Co-authored-by: Miriam <31922082+MiriamAparicio@users.noreply.github.com>
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:fix Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[APM] Fix Jest test suites with unhandled promise rejections
5 participants