From 238bdb3e2010620a391fd498355f433473d0eb03 Mon Sep 17 00:00:00 2001 From: Giorgos Bamparopoulos Date: Thu, 25 Jan 2024 11:21:58 +0000 Subject: [PATCH] [Logs Explorer] Functional tests: Complete cleanup before continuing with the next tests (#175517) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This [functional test](https://github.com/elastic/kibana/blob/b25407edba0bb146c37d74b24e01d8c6367bfa64/x-pack/test/functional/apps/observability_log_explorer/dataset_selector.ts#L311) was failing locally, as it was expecting the integration to be `Apache HTTP Server` but was in fact `1password`. This is because the previous test loads more integrations (than the original 3) and sometimes it doesn’t clean up in time before the next test runs. This PR adds `await` on the async [cleanupAdditionalSetup](https://github.com/elastic/kibana/blob/main/x-pack/test/functional/apps/observability_log_explorer/dataset_selector.ts#L298) call to complete the cleanup before continuing with other tests. --- .../apps/observability_log_explorer/dataset_selector.ts | 2 +- .../observability_log_explorer/dataset_selector.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/test/functional/apps/observability_log_explorer/dataset_selector.ts b/x-pack/test/functional/apps/observability_log_explorer/dataset_selector.ts index 98cfc79c561ad..1d7eae0129ce6 100644 --- a/x-pack/test/functional/apps/observability_log_explorer/dataset_selector.ts +++ b/x-pack/test/functional/apps/observability_log_explorer/dataset_selector.ts @@ -295,7 +295,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(nodes.length).to.be(20); }); - cleanupAdditionalSetup(); + await cleanupAdditionalSetup(); }); describe('clicking on integration and moving into the second navigation level', () => { diff --git a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/dataset_selector.ts b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/dataset_selector.ts index cb9f5f32f6542..de0f3b24d9a35 100644 --- a/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/dataset_selector.ts +++ b/x-pack/test_serverless/functional/test_suites/observability/observability_log_explorer/dataset_selector.ts @@ -296,7 +296,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { expect(nodes.length).to.be(20); }); - cleanupAdditionalSetup(); + await cleanupAdditionalSetup(); }); describe('clicking on integration and moving into the second navigation level', () => {