[Files] Fix flaky file creation and deletion tests (#141753) (#142832)

* set has content to false

* [revert this] only run the flaky test

* remove .only

(cherry picked from commit 8219489639)

Co-authored-by: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
This commit is contained in:
Kibana Machine 2022-10-06 06:43:04 -06:00 committed by GitHub
parent 565ddb4049
commit 9acd875cc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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 }),
]);
});
});