From 4f94a3ab42f3b2c31dc4bb76d1cb8e52abee4f62 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 25 Oct 2024 22:51:39 +1100 Subject: [PATCH] [8.16] [ML] AIOps: Fix and reenable functional tests for log rate analysis (#197760) (#197795) # Backport This will backport the following commits from `main` to `8.16`: - [[ML] AIOps: Fix and reenable functional tests for log rate analysis (#197760)](https://github.com/elastic/kibana/pull/197760) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Walter Rafelsberger --- .../apps/aiops/log_rate_analysis.ts | 3 +- ...arequote_data_view_test_data_with_query.ts | 206 +++++++++--------- 2 files changed, 107 insertions(+), 102 deletions(-) diff --git a/x-pack/test/functional/apps/aiops/log_rate_analysis.ts b/x-pack/test/functional/apps/aiops/log_rate_analysis.ts index 452ba8fad99cb..d6acad691b195 100644 --- a/x-pack/test/functional/apps/aiops/log_rate_analysis.ts +++ b/x-pack/test/functional/apps/aiops/log_rate_analysis.ts @@ -315,8 +315,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) { }); } - // Failing: See https://github.com/elastic/kibana/issues/176387 - describe.skip('log rate analysis', function () { + describe('log rate analysis', function () { for (const testData of logRateAnalysisTestData) { describe(`with '${testData.sourceIndexOrSavedSearch}'`, function () { before(async () => { diff --git a/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/farequote_data_view_test_data_with_query.ts b/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/farequote_data_view_test_data_with_query.ts index 31cfcda6924f8..e5a8b4783d7bb 100644 --- a/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/farequote_data_view_test_data_with_query.ts +++ b/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/farequote_data_view_test_data_with_query.ts @@ -64,128 +64,134 @@ export const farequoteDataViewTestDataWithQuery: TestData = { filters: [], searchQuery: { bool: { - filter: [], - must_not: [ + filter: [ { bool: { - minimum_should_match: 1, - should: [ - { - bool: { - minimum_should_match: 1, - should: [ - { - term: { - airline: { - value: 'SWR', + must_not: { + bool: { + minimum_should_match: 1, + should: [ + { + bool: { + minimum_should_match: 1, + should: [ + { + term: { + airline: { + value: 'SWR', + }, + }, }, - }, + ], }, - ], - }, - }, - { - bool: { - minimum_should_match: 1, - should: [ - { - term: { - airline: { - value: 'ACA', + }, + { + bool: { + minimum_should_match: 1, + should: [ + { + term: { + airline: { + value: 'ACA', + }, + }, }, - }, + ], }, - ], - }, - }, - { - bool: { - minimum_should_match: 1, - should: [ - { - term: { - airline: { - value: 'AWE', + }, + { + bool: { + minimum_should_match: 1, + should: [ + { + term: { + airline: { + value: 'AWE', + }, + }, }, - }, + ], }, - ], - }, - }, - { - bool: { - minimum_should_match: 1, - should: [ - { - term: { - airline: { - value: 'BAW', + }, + { + bool: { + minimum_should_match: 1, + should: [ + { + term: { + airline: { + value: 'BAW', + }, + }, }, - }, + ], }, - ], - }, - }, - { - bool: { - minimum_should_match: 1, - should: [ - { - term: { - airline: { - value: 'JAL', + }, + { + bool: { + minimum_should_match: 1, + should: [ + { + term: { + airline: { + value: 'JAL', + }, + }, }, - }, + ], }, - ], - }, - }, - { - bool: { - minimum_should_match: 1, - should: [ - { - term: { - airline: { - value: 'JBU', + }, + { + bool: { + minimum_should_match: 1, + should: [ + { + term: { + airline: { + value: 'JBU', + }, + }, }, - }, + ], }, - ], - }, - }, - { - bool: { - minimum_should_match: 1, - should: [ - { - term: { - airline: { - value: 'JZA', + }, + { + bool: { + minimum_should_match: 1, + should: [ + { + term: { + airline: { + value: 'JZA', + }, + }, }, - }, + ], }, - ], - }, - }, - { - bool: { - minimum_should_match: 1, - should: [ - { - term: { - airline: { - value: 'KLM', + }, + { + bool: { + minimum_should_match: 1, + should: [ + { + term: { + airline: { + value: 'KLM', + }, + }, }, - }, + ], }, - ], - }, + }, + ], }, - ], + }, }, }, ], + must: [], + must_not: [], + should: [], }, }, searchQueryLanguage: 'kuery',