[Fleet] Increase number of attempts on flaky unenroll test (#164734)

## Summary

Closes #157205 

Add an extra attempt to this flky test.

bonus: we were rejecting with strings which was giving us this funny
error:

```
[Error: the string "action timed out" was thrown, throw an Error :)]
```
This commit is contained in:
Mark Hopkin 2023-08-24 17:13:29 +01:00 committed by GitHub
parent fda98b0a88
commit f2c69986fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 6 deletions

View file

@ -201,7 +201,7 @@ export default function (providerContext: FtrProviderContext) {
const intervalId = setInterval(async () => {
if (attempts > 2) {
clearInterval(intervalId);
reject('action timed out');
reject(new Error('action timed out'));
}
++attempts;
const {

View file

@ -87,7 +87,7 @@ export default function (providerContext: FtrProviderContext) {
const intervalId = setInterval(async () => {
if (attempts > 2) {
clearInterval(intervalId);
reject('action timed out');
reject(new Error('action timed out'));
}
++attempts;
const {

View file

@ -204,9 +204,9 @@ export default function (providerContext: FtrProviderContext) {
await new Promise((resolve, reject) => {
let attempts = 0;
const intervalId = setInterval(async () => {
if (attempts > 2) {
if (attempts > 3) {
clearInterval(intervalId);
reject('action timed out');
reject(new Error('action timed out'));
}
++attempts;
const {

View file

@ -78,7 +78,7 @@ export default function (providerContext: FtrProviderContext) {
const intervalId = setInterval(async () => {
if (attempts > 4) {
clearInterval(intervalId);
reject('action timed out');
reject(new Error('action timed out'));
}
++attempts;
const {

View file

@ -618,7 +618,7 @@ export default function (providerContext: FtrProviderContext) {
const intervalId = setInterval(async () => {
if (attempts > 4) {
clearInterval(intervalId);
reject('action timed out');
reject(new Error('action timed out'));
}
++attempts;
const {