Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase default retry delay #1514

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/middleware/options/RetryHandlerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ export class RetryHandlerOptions implements MiddlewareOptions {
* @static
* A member holding default maxRetries value
*/
private static DEFAULT_MAX_RETRIES = 3;
private static DEFAULT_MAX_RETRIES = 12;

/**
* @private
* @static
* A member holding maximum delay value in seconds
* A member holding maximum delay value (1 hour) in seconds
*/
private static MAX_DELAY = 180;
private static MAX_DELAY = 3_600;

/**
* @private
* @static
* A member holding maximum maxRetries value
*/
private static MAX_MAX_RETRIES = 10;
private static MAX_MAX_RETRIES = 64;

/**
* @public
Expand Down
4 changes: 2 additions & 2 deletions test/common/middleware/RetryHandlerOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ describe("RetryHandlerOptions.ts", () => {
it("Should throw error for both delay and maxRetries are higher than the limit", () => {
try {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const options = new RetryHandlerOptions(1000, 1000);
const options = new RetryHandlerOptions(100_000, 1000);
throw new Error("Test Failed - Something wrong with the delay and maxRetries max limit validation");
} catch (error) {
assert.equal(error.name, "MaxLimitExceeded");
Expand All @@ -31,7 +31,7 @@ describe("RetryHandlerOptions.ts", () => {
it("Should throw error for delay is higher than the limit", () => {
try {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const options = new RetryHandlerOptions(1000, 2);
const options = new RetryHandlerOptions(100_000, 2);
throw new Error("Test Failed - Test Failed - Something wrong with the delay max limit validation");
} catch (error) {
assert.equal(error.name, "MaxLimitExceeded");
Expand Down
Loading