Permalink
Browse files

test: improve assert message in http timeout test

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 19, 2018
1 parent 4b71b01 commit 36696cfe8479f3fd511124b60c24b4a6a33a80da
Showing with 4 additions and 2 deletions.
  1. +4 −2 test/parallel/test-http-client-timeout-option-with-agent.js
@@ -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();

0 comments on commit 36696cf

Please sign in to comment.