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 <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott authored and targos committed Sep 3, 2018
1 parent 22adebf commit e8e014a
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
Original file line number Diff line number Diff line change
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 e8e014a

Please sign in to comment.