diff --git a/common.ts b/common.ts index a0bd1ee1..9b8de5cc 100644 --- a/common.ts +++ b/common.ts @@ -344,8 +344,8 @@ export const createRequestFunction = function (axiosArgs: RequestArgs, axiosInst configuration.isValid(); const retryParams = axiosArgs.options?.retryParams ? axiosArgs.options?.retryParams : configuration.retryParams; - const maxRetry: number = retryParams?.maxRetry ?? 0; - const minWaitInMs: number = retryParams?.minWaitInMs ?? 0; + const maxRetry: number = retryParams?.maxRetry ?? SdkConstants.DefaultMaxRetry; + const minWaitInMs: number = retryParams?.minWaitInMs ?? SdkConstants.DefaultMinWaitInMs; const start = performance.now(); diff --git a/tests/client.test.ts b/tests/client.test.ts index 52dfe73b..55cb244a 100644 --- a/tests/client.test.ts +++ b/tests/client.test.ts @@ -1837,7 +1837,7 @@ describe("OpenFGA Client", () => { user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", object: "workspace:1", relations: ["admin", "guest", "reader", "viewer"], - }); + }, { retryParams: { maxRetry: 0 } }); } catch (err) { expect(scope0.isDone()).toBe(true); expect(scope1.isDone()).toBe(true); diff --git a/tests/helpers/nocks.ts b/tests/helpers/nocks.ts index 11e73a15..f75245b1 100644 --- a/tests/helpers/nocks.ts +++ b/tests/helpers/nocks.ts @@ -287,4 +287,4 @@ export const getNocks = ((nock: typeof Nock) => ({ .put(`/stores/${storeId}/assertions/${modelId}`) .reply(responseStatus); }, -})); +})); \ No newline at end of file