Skip to content

Commit

Permalink
test: improve assert message in http timeout test
Browse files Browse the repository at this point in the history
PR-URL: #22403
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott committed Aug 21, 2018
1 parent 4b71b01 commit 36696cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/parallel/test-http-client-timeout-option-with-agent.js
Expand Up @@ -43,8 +43,10 @@ function doRequest() {
const duration = Date.now() - start;
// The timeout event cannot be precisely timed. It will delay
// some number of milliseconds.
assert.ok(duration >= HTTP_CLIENT_TIMEOUT,
`${duration} < ${HTTP_CLIENT_TIMEOUT}`);
assert.ok(
duration >= HTTP_CLIENT_TIMEOUT,
`duration ${duration}ms less than timeout ${HTTP_CLIENT_TIMEOUT}ms`
);
}));
req.end();

Expand Down

0 comments on commit 36696cf

Please sign in to comment.