From c10d07674e073495e4c392ae3bd6862ef9d3a725 Mon Sep 17 00:00:00 2001 From: Jean-Louis Leysens Date: Thu, 6 Oct 2022 13:10:39 +0200 Subject: [PATCH] [Files] Fix flaky file creation and deletion tests (#141753) * set has content to false * [revert this] only run the flaky test * remove .only (cherry picked from commit 8219489639f4dbaa3d25345a9d8552ded6344ad4) --- .../integration_tests/es_file_client.test.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/files/server/file_client/integration_tests/es_file_client.test.ts b/x-pack/plugins/files/server/file_client/integration_tests/es_file_client.test.ts index 25e6e1b5d4c16..58bf5cec29c41 100644 --- a/x-pack/plugins/files/server/file_client/integration_tests/es_file_client.test.ts +++ b/x-pack/plugins/files/server/file_client/integration_tests/es_file_client.test.ts @@ -11,11 +11,7 @@ import { createEsFileClient } from '../create_es_file_client'; import { FileClient } from '../types'; import { FileMetadata } from '../../../common'; -/** - * This file client is using Elasticsearch interfaces directly to manage files. - */ -// FLAKY: https://github.com/elastic/kibana/issues/139565 -describe.skip('ES-index-backed file client', () => { +describe('ES-index-backed file client', () => { let esClient: TestEnvironmentUtils['esClient']; let fileClient: FileClient; let testHarness: TestEnvironmentUtils; @@ -197,6 +193,9 @@ describe.skip('ES-index-backed file client', () => { }) ); - await Promise.all([fileClient.delete({ id: id1 }), fileClient.delete({ id: id2 })]); + await Promise.all([ + fileClient.delete({ id: id1, hasContent: false }), + fileClient.delete({ id: id2, hasContent: false }), + ]); }); });