Wait for a yellow source before starting reindex (#113382)

This commit is contained in:
Rudolf Meijering 2021-09-29 16:22:47 +02:00 committed by GitHub
parent 781fdf9b07
commit aea6daa177
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -422,8 +422,7 @@ describe('migration actions', () => {
// Reindex doesn't return any errors on it's own, so we have to test
// together with waitForReindexTask
// FLAKY: https://github.com/elastic/kibana/issues/103231
describe.skip('reindex & waitForReindexTask', () => {
describe('reindex & waitForReindexTask', () => {
it('resolves right when reindex succeeds without reindex script', async () => {
const res = (await reindex({
client,
@ -792,6 +791,11 @@ describe('migration actions', () => {
`);
});
it('resolves left wait_for_task_completion_timeout when the task does not finish within the timeout', async () => {
await waitForIndexStatusYellow({
client,
index: '.kibana_1',
})();
const res = (await reindex({
client,
sourceIndex: '.kibana_1',