[8.10] [RAM] Fix flaky legacy alerts test suite (#164515) (#164611)

# Backport

This will backport the following commits from `main` to `8.10`:
- [[RAM] Fix flaky legacy alerts test suite
(#164515)](https://github.com/elastic/kibana/pull/164515)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Zacqary Adam
Xeper","email":"Zacqary@users.noreply.github.com"},"sourceCommit":{"committedDate":"2023-08-23T16:52:48Z","message":"[RAM]
Fix flaky legacy alerts test suite (#164515)\n\n## Summary\r\n\r\nCloses
#159124\r\nCloses #159123\r\n\r\nIt looks like removing an `async` from
a function that didn't actually\r\n`await` anything fixed a flaky
Promise execution. Flaky test runner\r\nsucceeds on this
branch:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2957#018a1ef8-6514-4abe-a55c-cbe646bf64a2\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"83d27aafd2e02349cb2b3774bf2d23287deb6041","branchLabelMapping":{"^v8.11.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v8.10.0","v8.11.0"],"number":164515,"url":"https://github.com/elastic/kibana/pull/164515","mergeCommit":{"message":"[RAM]
Fix flaky legacy alerts test suite (#164515)\n\n## Summary\r\n\r\nCloses
#159124\r\nCloses #159123\r\n\r\nIt looks like removing an `async` from
a function that didn't actually\r\n`await` anything fixed a flaky
Promise execution. Flaky test runner\r\nsucceeds on this
branch:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2957#018a1ef8-6514-4abe-a55c-cbe646bf64a2\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"83d27aafd2e02349cb2b3774bf2d23287deb6041"}},"sourceBranch":"main","suggestedTargetBranches":["8.10"],"targetPullRequestStates":[{"branch":"8.10","label":"v8.10.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.11.0","labelRegex":"^v8.11.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/164515","number":164515,"mergeCommit":{"message":"[RAM]
Fix flaky legacy alerts test suite (#164515)\n\n## Summary\r\n\r\nCloses
#159124\r\nCloses #159123\r\n\r\nIt looks like removing an `async` from
a function that didn't actually\r\n`await` anything fixed a flaky
Promise execution. Flaky test runner\r\nsucceeds on this
branch:\r\nhttps://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/2957#018a1ef8-6514-4abe-a55c-cbe646bf64a2\r\n\r\n###
Checklist\r\n- [x] [Unit or
functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere
updated or added to match the most common
scenarios","sha":"83d27aafd2e02349cb2b3774bf2d23287deb6041"}}]}]
BACKPORT-->

Co-authored-by: Zacqary Adam Xeper <Zacqary@users.noreply.github.com>
This commit is contained in:
Kibana Machine 2023-08-23 14:03:18 -04:00 committed by GitHub
parent 8280591d7d
commit f02c4c3d81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,9 +56,7 @@ export default function alertTests({ getService }: FtrProviderContext) {
),
};
// FLAKY: https://github.com/elastic/kibana/issues/159123
// FLAKY: https://github.com/elastic/kibana/issues/15912
describe.skip('alerts', () => {
describe('alerts', () => {
const authorizationIndex = '.kibana-test-authorization';
const objectRemover = new ObjectRemover(supertest);
@ -87,7 +85,7 @@ export default function alertTests({ getService }: FtrProviderContext) {
describe(scenario.id, () => {
let alertUtils: AlertUtils;
before(async () => {
before(() => {
alertUtils = new AlertUtils({
user,
space,