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

Mock lodash debounce to fix embedded_visualize_handler unstable tests #44592

Merged

Conversation

lizozom
Copy link
Contributor

@lizozom lizozom commented Sep 2, 2019

Summary

Occasionally and inconsistently, when running embedded_visualize_handler jest tests, you wound get the following error:

Ran 100000 timers, and there are still more! Assuming we’ve hit an infinite recursion and bailing out.

Seems like this error seem happens when using lodash.debounce and runAllTimers together. This version uses a solution suggested on the thread: mocking lodash.debounce and removing runAllTimers altogether.

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

@lizozom lizozom added failed-test A test failure on a tracked branch, potentially flaky-test Team:AppArch labels Sep 2, 2019
@lizozom lizozom self-assigned this Sep 2, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-test-triage

@lizozom lizozom added release_note:skip Skip the PR/issue when compiling release notes v7.5.0 v8.0.0 labels Sep 2, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@lizozom lizozom changed the title Mock lodash debounce to avoid test instability Mock lodash debounce to fix embed_visualize_handler unstable tests Sep 2, 2019
@lizozom lizozom changed the title Mock lodash debounce to fix embed_visualize_handler unstable tests Mock lodash debounce to fix embedded_visualize_handler unstable tests Sep 2, 2019
Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

LGTM

@lizozom lizozom merged commit a31b099 into elastic:master Sep 2, 2019
lizozom pushed a commit to lizozom/kibana that referenced this pull request Sep 2, 2019
@lizozom lizozom deleted the tests/stabilize-embed-visualize-handler branch November 14, 2019 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
failed-test A test failure on a tracked branch, potentially flaky-test release_note:skip Skip the PR/issue when compiling release notes v7.5.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants