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

[Index management] Unskip jest tests #76672

Merged
merged 22 commits into from
Sep 15, 2020

Conversation

sebelga
Copy link
Contributor

@sebelga sebelga commented Sep 3, 2020

PR to unskip our tests in the Index management app.

I fixed a small regression where the index settings were not read by the mappings editor and thus the analyzer "custom" select was not displayed to chose a possible custom analyzer defined in the index settings.

Index management

Screenshot 2020-09-10 at 16 15 14

Fixes #59849
Fixes #67833
Fixes #65567
Fixes #66669
Fixes #66457

@sebelga sebelga added non-issue Indicates to automation that a pull request should not appear in the release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more test-jest-integration labels Sep 3, 2020
@sebelga sebelga changed the title [Es UI apps] Unskip jest tests [ES UI apps] Unskip jest tests Sep 3, 2020
@sebelga sebelga force-pushed the tests/unskip-jest-tests-2 branch from 674bd93 to e8bdc75 Compare September 9, 2020 13:57
@sebelga sebelga force-pushed the tests/unskip-jest-tests-2 branch from 7593e61 to ecb649d Compare September 10, 2020 12:32
@sebelga sebelga marked this pull request as ready for review September 10, 2020 14:23
@sebelga sebelga requested a review from a team as a code owner September 10, 2020 14:23
@elasticmachine
Copy link
Contributor

Pinging @elastic/es-ui (Team:Elasticsearch UI)

@sebelga sebelga changed the title [ES UI apps] Unskip jest tests [Index management] Unskip jest tests Sep 10, 2020
@sebelga sebelga added Feature:Index Management Index and index templates UI release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v8.0.0 labels Sep 10, 2020
@sebelga
Copy link
Contributor Author

sebelga commented Sep 11, 2020

@elasticmachine merge upstream

@sebelga
Copy link
Contributor Author

sebelga commented Sep 11, 2020

@elasticmachine merge upstream

@cjcenizal
Copy link
Contributor

@elasticmachine merge upstream

@cjcenizal
Copy link
Contributor

@elasticmachine merge upstream

@cjcenizal
Copy link
Contributor

@elasticmachine merge upstream

3 similar comments
@cjcenizal
Copy link
Contributor

@elasticmachine merge upstream

@sebelga
Copy link
Contributor Author

sebelga commented Sep 13, 2020

@elasticmachine merge upstream

@sebelga
Copy link
Contributor Author

sebelga commented Sep 14, 2020

@elasticmachine merge upstream

@yuliacech
Copy link
Contributor

Hi @sebelga ,
great job on fixing these flaky test! Changes look good to me, I just have a couple questions to better understand the flakiness of the tests.

  • I noticed you deleted nextTick in test files in __jest__/client_integration/index_template_wizard/, which I think was the main reason for flakiness, right? So do jest.useFakeTimers() and jest.useRealTimers() change anything further in these tests? I was not able to see any flakiness locally with jest timers removed.
  • Similar question is for tests in /public/application/components/: Following your changes, I believe you fixed flaky tests by placing async UI actions outside of act and await them. Do you still need jest timers here?

@sebelga
Copy link
Contributor Author

sebelga commented Sep 14, 2020

So the jest.useFakeTimers() gives us the guarantee to not use real timers. Not only in our test but in the code under test. So I do like to have it defined on top of my test to make sure that anything should work without a timer. If the test does not pass, it probably means that the consumer require some time to pass, and in that case we would manually add that time in the test.

I was not able to see any flakiness locally with jest timers removed.

The flakiness that we got on our tests only showed up in CI as all the tests are run in parallel and stress the machine. Locally we only run a tiny portion of them and the flakiness is very hard to detect.

Copy link
Contributor

@yuliacech yuliacech left a comment

Choose a reason for hiding this comment

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

I see, @sebelga , thanks a lot for your explanation! I'm good with merging and looking forward to learning more about tests from you :)

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

async chunks size

id value diff baseline
indexManagement 1.5MB +2.4KB 1.5MB

History

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

@sebelga
Copy link
Contributor Author

sebelga commented Sep 15, 2020

Thanks for the review @yuliacech ! Giving it another 20 passes and then merging 😊 https://kibana-ci.elastic.co/job/kibana+flaky-test-suite-runner/831/

@sebelga sebelga merged commit aae704a into elastic:master Sep 15, 2020
@sebelga sebelga deleted the tests/unskip-jest-tests-2 branch September 15, 2020 10:39
sebelga added a commit that referenced this pull request Sep 15, 2020
Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Elastic Machine <[email protected]>
This was referenced Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment