diff --git a/packages/kbn-journeys/journey/journey_ftr_harness.ts b/packages/kbn-journeys/journey/journey_ftr_harness.ts index 672b14f0e1a85..952017492e072 100644 --- a/packages/kbn-journeys/journey/journey_ftr_harness.ts +++ b/packages/kbn-journeys/journey/journey_ftr_harness.ts @@ -120,12 +120,19 @@ export class JourneyFtrHarness { await Promise.all([ this.setupApm(), this.setupBrowserAndPage(), - asyncForEach(this.journeyConfig.getEsArchives(), async (esArchive) => { - await this.esArchiver.load(esArchive); - }), - asyncForEach(this.journeyConfig.getKbnArchives(), async (kbnArchive) => { - await this.kibanaServer.importExport.load(kbnArchive); - }), + (async () => { + await Promise.all([ + asyncForEach(this.journeyConfig.getEsArchives(), async (esArchive) => { + await this.esArchiver.load(esArchive); + }), + asyncForEach(this.journeyConfig.getKbnArchives(), async (kbnArchive) => { + await this.kibanaServer.importExport.load(kbnArchive); + }), + ]); + + // wait after loading the data, before doing any querying in tests + await setTimeout(10_000); + })(), ]); }