Conversation
Pull Request Test Coverage Report for Build 683
💛 - Coveralls |
Pull Request Test Coverage Report for Build 689
💛 - Coveralls |
| private queueRunning = false; | ||
|
|
||
| constructor(protected transportInstance: ITransport) { | ||
| constructor(protected transportInstance: ITransport, private httpThrottle: number) { |
There was a problem hiding this comment.
Maybe better use options object, with httpThrottle property to solve problem possible additional properties in feature.
| queuedTest.parameters, | ||
| this.config.envParameters | ||
| this.config.envParameters, | ||
| this.config.httpThrottle |
There was a problem hiding this comment.
We have runData property in this.config.parameters. Not sure it's a good idea to make new argument for every config parameter that we will need.
|
|
||
| let isAsync = false; | ||
|
|
||
| this.testAPI.setHttpThrottle(message.httpThrottle); |
There was a problem hiding this comment.
I'd prefer as with execute send this property with test parameters
|
@flops Moved httpThrottle to parameters in worker. abstractHttpClient is now using params object. |
packages/api/src/test-context.ts
Outdated
| httpThrottle: config.httpThrottle, | ||
| }; | ||
|
|
||
| this.http = new HttpClient(transport, httpClientParams); |
There was a problem hiding this comment.
| this.http = new HttpClient(transport, httpClientParams); | |
| this.httpClient = new HttpClient(transport, { | |
| httpThrottle: config.httpThrottle, | |
| }); |
packages/cli/src/commands/record.ts
Outdated
| const httpClientParams = { | ||
| httpThrottle: this.config.httpThrottle, | ||
| }; | ||
| const httpClient = new HttpClientLocal(this.transport, httpClientParams); |
packages/cli/src/commands/run.ts
Outdated
| const httpClientParams = { | ||
| httpThrottle: this.config.httpThrottle, | ||
| }; | ||
| const httpClient = new HttpClientLocal(this.transport, httpClientParams); |
|
|
||
| constructor(protected transportInstance: ITransport) { | ||
| constructor(protected transportInstance: ITransport, private params: HttpClientParams) { | ||
| this.queue = new Queue(); |
There was a problem hiding this comment.
Don't use common words for naming
| this.queue = new Queue(); | |
| this.requestQueue = new Queue(); |
| this.queueRunning = false; | ||
| } | ||
|
|
||
| private pushQueue(requestParameters: IHttpRequest, cookieJar?: IHttpCookieJar): Promise<any> { |
There was a problem hiding this comment.
| private pushQueue(requestParameters: IHttpRequest, cookieJar?: IHttpCookieJar): Promise<any> { | |
| private pushToQueue(requestParameters: IHttpRequest, cookieJar?: IHttpCookieJar): Promise<any> { |
|
|
||
| private pushQueue(requestParameters: IHttpRequest, cookieJar?: IHttpCookieJar): Promise<any> { | ||
| return new Promise(async (resolve, reject) => { | ||
| this.queue.push(() => this.sendRequest(requestParameters, cookieJar).then(resolve, reject)); |
There was a problem hiding this comment.
Move function to separated variable
| let screenshotsEnabled = false; | ||
| let isRetryRun = queueItem.retryCount > 0; | ||
| const { | ||
| debug = false, |
There was a problem hiding this comment.
don't use default values, they must be already defined in config
No description provided.