[Infra] Fix Source Configuration test clean up (#187955)

fixes [#177141](https://github.com/elastic/kibana/issues/177141)

## Summary

Apparently the error was caused by some hanging promise.

https://buildkite.com/elastic/kibana-flaky-test-suite-runner/builds/6508

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
Carlos Crespo 2024-07-11 13:29:35 +02:00 committed by GitHub
parent 5761a382e1
commit ce9cadf899
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,20 +31,16 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => {
const kibanaServer = getService('kibanaServer');
describe('Infrastructure Source Configuration', function () {
before(async () => {
await kibanaServer.savedObjects.cleanStandardList();
});
after(async () => {
await kibanaServer.savedObjects.cleanStandardList();
});
before(async () => kibanaServer.savedObjects.cleanStandardList());
after(async () => kibanaServer.savedObjects.cleanStandardList());
describe('with metrics present', () => {
before(async () => {
await esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs');
});
after(async () => {
await esArchiver.unload('x-pack/test/functional/es_archives/infra/metrics_and_logs');
});
before(async () =>
esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs')
);
after(async () =>
esArchiver.unload('x-pack/test/functional/es_archives/infra/metrics_and_logs')
);
it('renders the waffle map', async () => {
await pageObjects.common.navigateToApp('infraOps');