Skip to content

Commit

Permalink
Fix flaky SO import tests (#97586) (#97616)
Browse files Browse the repository at this point in the history
* Fix flaky SO import tests

* [will be reverted] remove all tests from CI group 8

* Revert "[will be reverted] remove all tests from CI group 8"

This reverts commit ede007ec

* Revert "[will be reverted] remove all tests from CI group 8"

This reverts commit ede007ec
  • Loading branch information
pgayvallet committed Apr 20, 2021
1 parent ceec53c commit 13388cf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/functional/apps/management/_import_objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { keyBy } from 'lodash';
import { FtrProviderContext } from '../../ftr_provider_context';

const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));

function uniq<T>(input: T[]): T[] {
return [...new Set(input)];
}
Expand All @@ -23,9 +24,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
const testSubjects = getService('testSubjects');
const log = getService('log');

// FLAKY: https://github.com/elastic/kibana/issues/95660
// FLAKY: https://github.com/elastic/kibana/issues/95706
describe.skip('import objects', function describeIndexTests() {
describe('import objects', function describeIndexTests() {
describe('.ndjson file', () => {
beforeEach(async function () {
await esArchiver.load('management');
Expand Down Expand Up @@ -314,7 +313,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
// but as the initial popin can take a few ms before fading, we need to wait a little
// to avoid clicking twice on the same modal.
await delay(1000);
await PageObjects.common.clickConfirmOnModal(false);
await PageObjects.common.clickConfirmOnModal(true);

const isSuccessful = await testSubjects.exists('importSavedObjectsSuccess');
expect(isSuccessful).to.be(true);
Expand All @@ -335,7 +334,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
// but as the initial popin can take a few ms before fading, we need to wait a little
// to avoid clicking twice on the same modal.
await delay(1000);
await PageObjects.common.clickConfirmOnModal(false);
await PageObjects.common.clickConfirmOnModal(true);

const isSuccessful = await testSubjects.exists('importSavedObjectsSuccess');
expect(isSuccessful).to.be(true);
Expand Down

0 comments on commit 13388cf

Please sign in to comment.