Skip to content

Commit

Permalink
Pass timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdjere committed Jan 4, 2024
1 parent 7202291 commit 1a9782a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ export const retry = async <T>({
test,
retryService,
retries,
timeout,
}: {
test: () => Promise<T>;
retryService: RetryService;
retries: number;
timeout?: number;
}): Promise<T | Error> => {
let retryAttempt = 0;
const response = await retryService.try(
Expand All @@ -33,7 +35,8 @@ export const retry = async <T>({
return test();
},
undefined,
200
200,
timeout
);

// Now throw the error in order to fail the test.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const installPrebuiltRulesPackageViaFleetAPI = async (
},
retryService,
retries: 2,
timeout: 120000,
});

await refreshSavedObjectIndices(es);
Expand Down Expand Up @@ -80,6 +81,7 @@ export const installPrebuiltRulesPackageByVersion = async (
},
retryService,
retries: 2,
timeout: 120000,
});

await refreshSavedObjectIndices(es);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const installPrebuiltRulesFleetPackage = async ({
},
retryService,
retries: 2,
timeout: 120000,
});

await refreshSavedObjectIndices(es);
Expand Down Expand Up @@ -88,6 +89,7 @@ export const installPrebuiltRulesFleetPackage = async ({
},
retryService,
retries: 2,
timeout: 120000,
});

await refreshSavedObjectIndices(es);
Expand Down

0 comments on commit 1a9782a

Please sign in to comment.