[journeys] add a short delay after loading data (#141437)

This commit is contained in:
Spencer 2022-09-22 09:58:01 -05:00 committed by GitHub
parent 837da729bd
commit 37d6b9d38a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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