mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
Fix flaky migrations integration test 103231 (#113127)
This commit is contained in:
parent
ba4913829e
commit
c361a56013
2 changed files with 13 additions and 27 deletions
|
@ -7,9 +7,7 @@
|
|||
*/
|
||||
|
||||
import { ElasticsearchClient } from '../../../../';
|
||||
import { InternalCoreStart } from '../../../../internal_types';
|
||||
import * as kbnTestServer from '../../../../../test_helpers/kbn_server';
|
||||
import { Root } from '../../../../root';
|
||||
import { SavedObjectsRawDoc } from '../../../serialization';
|
||||
import {
|
||||
bulkOverwriteTransformedDocuments,
|
||||
|
@ -43,12 +41,14 @@ import * as Option from 'fp-ts/lib/Option';
|
|||
import { ResponseError } from '@elastic/elasticsearch/lib/errors';
|
||||
import { DocumentsTransformFailed, DocumentsTransformSuccess } from '../../../migrations/core';
|
||||
import { TaskEither } from 'fp-ts/lib/TaskEither';
|
||||
import Path from 'path';
|
||||
|
||||
const { startES } = kbnTestServer.createTestServers({
|
||||
adjustTimeout: (t: number) => jest.setTimeout(t),
|
||||
settings: {
|
||||
es: {
|
||||
license: 'basic',
|
||||
dataArchive: Path.join(__dirname, './archives', '7.7.2_xpack_100k_obj.zip'),
|
||||
esArgs: ['http.max_content_length=10Kb'],
|
||||
},
|
||||
},
|
||||
|
@ -56,22 +56,11 @@ const { startES } = kbnTestServer.createTestServers({
|
|||
let esServer: kbnTestServer.TestElasticsearchUtils;
|
||||
|
||||
describe('migration actions', () => {
|
||||
let root: Root;
|
||||
let start: InternalCoreStart;
|
||||
let client: ElasticsearchClient;
|
||||
|
||||
beforeAll(async () => {
|
||||
esServer = await startES();
|
||||
root = kbnTestServer.createRootWithCorePlugins({
|
||||
server: {
|
||||
basePath: '/hello',
|
||||
},
|
||||
});
|
||||
|
||||
await root.preboot();
|
||||
await root.setup();
|
||||
start = await root.start();
|
||||
client = start.elasticsearch.client.asInternalUser;
|
||||
client = esServer.es.getClient();
|
||||
|
||||
// Create test fixture data:
|
||||
await createIndex({
|
||||
|
@ -117,7 +106,6 @@ describe('migration actions', () => {
|
|||
|
||||
afterAll(async () => {
|
||||
await esServer.stop();
|
||||
await root.shutdown();
|
||||
});
|
||||
|
||||
describe('fetchIndices', () => {
|
||||
|
@ -320,14 +308,14 @@ describe('migration actions', () => {
|
|||
});
|
||||
expect.assertions(1);
|
||||
await expect(task()).resolves.toMatchInlineSnapshot(`
|
||||
Object {
|
||||
"_tag": "Right",
|
||||
"right": Object {
|
||||
"acknowledged": true,
|
||||
"shardsAcknowledged": true,
|
||||
},
|
||||
}
|
||||
`);
|
||||
Object {
|
||||
"_tag": "Right",
|
||||
"right": Object {
|
||||
"acknowledged": true,
|
||||
"shardsAcknowledged": true,
|
||||
},
|
||||
}
|
||||
`);
|
||||
});
|
||||
it('resolves right after waiting for index status to be yellow if clone target already existed', async () => {
|
||||
expect.assertions(2);
|
||||
|
@ -802,12 +790,10 @@ describe('migration actions', () => {
|
|||
}
|
||||
`);
|
||||
});
|
||||
|
||||
// FLAKY https://github.com/elastic/kibana/issues/113012
|
||||
it.skip('resolves left wait_for_task_completion_timeout when the task does not finish within the timeout', async () => {
|
||||
it('resolves left wait_for_task_completion_timeout when the task does not finish within the timeout', async () => {
|
||||
const res = (await reindex({
|
||||
client,
|
||||
sourceIndex: 'existing_index_with_docs',
|
||||
sourceIndex: '.kibana_1',
|
||||
targetIndex: 'reindex_target',
|
||||
reindexScript: Option.none,
|
||||
requireAlias: false,
|
||||
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue