Skip to content

Commit 7299d82

Browse files
committed
fix: disable retry in test env
1 parent e07d7e2 commit 7299d82

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ lint:
3939
@yarn lint
4040

4141
doc:
42-
@echo "Building the documenation..."
42+
@echo "Building the documentation..."
4343

4444
precommit: dep lint doc build test
4545

packages/sdk-util/src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class BaseClient {
3030
accessKey: '',
3131
accessSecret: '',
3232
maxQueryDepth: 4,
33-
retries: 3,
33+
retries: process.env.NODE_ENV === 'test' ? 0 : 3,
3434
},
3535
config
3636
);
@@ -55,7 +55,7 @@ class BaseClient {
5555

5656
this._doRequestWithRetry = (...args) =>
5757
pRetry(() => this._doRequest(...args), {
58-
retries: +this.config.retries ? +this.config.retries : 3,
58+
retries: this.config.retries !== undefined ? +this.config.retries : 3,
5959
factor: 2,
6060
minTimeout: 100,
6161
maxTimeout: 1000,

0 commit comments

Comments
 (0)