[SECURITY_SOLUTION] Retry on ingest setup (#75000)
This commit is contained in:
parent
187a13075b
commit
8aa8b04cee
|
@ -8,15 +8,18 @@ import { fleetSetupRouteService } from '../../../plugins/ingest_manager/common';
|
|||
|
||||
export function IngestManagerProvider({ getService }: FtrProviderContext) {
|
||||
const supertest = getService('supertest');
|
||||
const retry = getService('retry');
|
||||
return {
|
||||
async setup() {
|
||||
const headers = { accept: 'application/json', 'kbn-xsrf': 'some-xsrf-token' };
|
||||
|
||||
await supertest
|
||||
.post(fleetSetupRouteService.postFleetSetupPath())
|
||||
.set(headers)
|
||||
.send({ forceRecreate: true })
|
||||
.expect(200);
|
||||
await retry.try(async () => {
|
||||
await supertest
|
||||
.post(fleetSetupRouteService.postFleetSetupPath())
|
||||
.set(headers)
|
||||
.send({ forceRecreate: true })
|
||||
.expect(200);
|
||||
});
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue