mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
[Fleet] Make failing secrets test more robust (#164740)
## Summary Closes #163901 Instead of one sleep lets try 3 times.
This commit is contained in:
parent
30872c4bab
commit
67958a1660
1 changed files with 8 additions and 4 deletions
|
@ -598,12 +598,16 @@ export default function (providerContext: FtrProviderContext) {
|
|||
.set('kbn-xsrf', 'xxxx')
|
||||
.expect(200);
|
||||
|
||||
// sleep to allow for secrets to be deleted
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
for (let i = 0; i < 3; i++) {
|
||||
await new Promise((resolve) => setTimeout(resolve, 1000));
|
||||
|
||||
const searchRes = await getSecrets();
|
||||
const searchRes = await getSecrets();
|
||||
if (searchRes.hits.hits.length === 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
expect(searchRes.hits.hits.length).to.eql(0);
|
||||
throw new Error('Secrets not deleted');
|
||||
});
|
||||
|
||||
it('should not store secrets if fleet server does not meet minimum version', async () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue