Skip to content

Commit

Permalink
test: fix http-client-timeout-option-listeners
Browse files Browse the repository at this point in the history
test-http-client-timeout-option-listeners is flaky due to depending on
completing operations before a 100ms socket timeout. The socket timeout
is an integral part of the test but can be very large. Set to the
maximum allowable value.

PR-URL: #10224
Reviewed-By: Santiago Gimeno <[email protected]>
  • Loading branch information
Trott authored and MylesBorins committed Jan 24, 2017
1 parent b0cb787 commit f3b66af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/parallel/test-http-client-timeout-option-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,16 @@ const server = http.createServer((req, res) => {
res.end('');
});

// Maximum allowed value for timeouts
const timeout = Math.pow(2, 31) - 1;

const options = {
agent,
method: 'GET',
port: undefined,
host: common.localhostIPv4,
path: '/',
timeout: common.platformTimeout(100)
timeout: timeout
};

server.listen(0, options.host, common.mustCall(() => {
Expand Down

0 comments on commit f3b66af

Please sign in to comment.