-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Security Solutions][Detection Engine] Changes the loading of indexes in tests from beforeEach() to before() #110340
[Security Solutions][Detection Engine] Changes the loading of indexes in tests from beforeEach() to before() #110340
Conversation
Pinging @elastic/security-detections-response (Team:Detections and Resp) |
}); | ||
|
||
afterEach(async () => { | ||
await deleteSignalsIndex(supertest); | ||
await deleteAllAlerts(supertest); | ||
await esArchiver.load('x-pack/test/functional/es_archives/auditbeat/hosts'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NOTE: This one was a load
instead of unload
and did not technically ever unload the hosts, so I fixed it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM once green on CI! 👍 Thank-you for the optimization and cleanup here! 🙂
💚 Build SucceededMetrics [docs]
To update your PR or re-run it, just comment with: |
…elastic#110340) ## Summary Changes the loading of indexes in tests from beforeEach() to before() Hoping this fixes some flake we have seen recently. If it doesn't, at least tests should run faster and be less flake overall. If these two below do begin acting up again I will then probably resort to wrapping the individual tests around retry blocks or removing the tests. Also found one area within `x-pack/test/detection_engine_api_integration/security_and_spaces/tests/generating_signals.ts` where we do a `load` twice but I fixed it to the `load`/`unload` pattern. Issues this should fix: * elastic#107911 * elastic#107856 ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
…#110340) (#110368) ## Summary Changes the loading of indexes in tests from beforeEach() to before() Hoping this fixes some flake we have seen recently. If it doesn't, at least tests should run faster and be less flake overall. If these two below do begin acting up again I will then probably resort to wrapping the individual tests around retry blocks or removing the tests. Also found one area within `x-pack/test/detection_engine_api_integration/security_and_spaces/tests/generating_signals.ts` where we do a `load` twice but I fixed it to the `load`/`unload` pattern. Issues this should fix: * #107911 * #107856 ### Checklist - [ ] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios Co-authored-by: Frank Hassanabad <[email protected]>
Summary
Changes the loading of indexes in tests from beforeEach() to before()
Hoping this fixes some flake we have seen recently. If it doesn't, at least tests should run faster and be less flake overall. If these two below do begin acting up again I will then probably resort to wrapping the individual tests around retry blocks or removing the tests.
Also found one area within
x-pack/test/detection_engine_api_integration/security_and_spaces/tests/generating_signals.ts
where we do aload
twice but I fixed it to theload
/unload
pattern.Issues this should fix:
Checklist