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

[ResponseOps][Cases] clear query cache for cases flaky tests #191212

Merged

Conversation

js-jankisalvi
Copy link
Contributor

@js-jankisalvi js-jankisalvi commented Aug 23, 2024

Summary

Clear query cache to fix flakiness of jest unit tests in cases plugin.

Checklist

@js-jankisalvi js-jankisalvi added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) Feature:Cases Cases feature v8.16.0 labels Aug 23, 2024
@js-jankisalvi js-jankisalvi self-assigned this Aug 23, 2024
@js-jankisalvi
Copy link
Contributor Author

/ci

@js-jankisalvi js-jankisalvi added the release_note:skip Skip the PR/issue when compiling release notes label Aug 23, 2024
@js-jankisalvi
Copy link
Contributor Author

/ci

@js-jankisalvi
Copy link
Contributor Author

/ci

@js-jankisalvi js-jankisalvi marked this pull request as ready for review August 27, 2024 15:06
@js-jankisalvi js-jankisalvi requested a review from a team as a code owner August 27, 2024 15:06
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops-cases (Feature:Cases)

let appMockRenderer: AppMockRenderer;

beforeEach(() => {
appMockRenderer = createAppMockRenderer();
jest.clearAllMocks();
});

afterEach(() => {
appMockRenderer.queryClient.getQueryCache().clear();
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to have just one appMockRenderer.cleanup function that does everything. If there is something to change there would be just one place to update, wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated in 904fb11

@cnasikas cnasikas requested a review from jcger September 2, 2024 08:04
@cnasikas
Copy link
Member

cnasikas commented Sep 2, 2024

@elasticmachine merge upstream

@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

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

cc @js-jankisalvi

Copy link
Contributor

@jcger jcger left a comment

Choose a reason for hiding this comment

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

🤞

@js-jankisalvi js-jankisalvi merged commit a118728 into elastic:main Sep 2, 2024
41 checks passed
@js-jankisalvi js-jankisalvi deleted the cases-flaky-tests-query-cache branch September 2, 2024 10:45
@kibanamachine kibanamachine added the backport:skip This commit does not require backporting label Sep 2, 2024
This was referenced Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Cases Cases feature release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v8.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants