Skip to content

Commit

Permalink
fix(request-runner): handshake timeout in WsRequestRunner (#122)
Browse files Browse the repository at this point in the history
closes #121
  • Loading branch information
denis-maiorov-brightsec authored Sep 1, 2022
1 parent 0f04779 commit ac4859f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ describe('WsRequestRunner', () => {
});

it('should fail sending request by timeout', async () => {
when(spiedExecutorOptions.timeout).thenReturn(1);
when(spiedExecutorOptions.timeout).thenReturn(100);

const url = `ws://localhost:${wsPort}`;
const request = new Request({ url, headers: {} });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class WsRequestRunner implements RequestRunner {
return new WebSocket(options.url, {
agent: this.agent,
rejectUnauthorized: false,
timeout: this.options.timeout,
handshakeTimeout: this.options.timeout,
headers: this.normalizeHeaders(options.headers)
});
}
Expand Down

0 comments on commit ac4859f

Please sign in to comment.