Commit Graph

6 Commits

Author SHA1 Message Date
Rich Trott
b8977045f2 test: refactor test-http-client-timeout-option-with-agent
* Switch from Date.now() to process.hrtime.bigint().
* Move start time recording to before the request is created, not after.

Fixes: https://github.com/nodejs/node/issues/25746

PR-URL: https://github.com/nodejs/node/pull/25752
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
2019-01-29 18:36:04 -08:00
potham
f25123822e test: replace callback functions with arrow functions
PR-URL: https://github.com/nodejs/node/pull/24432
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2018-11-17 21:07:52 -08:00
Rich Trott
36696cfe84 test: improve assert message in http timeout test
PR-URL: https://github.com/nodejs/node/pull/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>
2018-08-20 18:59:12 -07:00
Rich Trott
4b71b01339 test: move http timeout test to parallel
test-http-client-timeout-option-with-agent no longer checks that the
timeout happens within a certain tolerance so it can be moved to the
parallel test suite.

PR-URL: https://github.com/nodejs/node/pull/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>
2018-08-20 18:59:08 -07:00
Ouyang Yadong
f8fda89df1
test: move test-http-client-timeout-option-with-agent to sequential
The timeout event cannot be precisely timed and the actual timeout
may be longer in some situations. Here we move this test into the
sequential folder to make it happens less likely.

PR-URL: https://github.com/nodejs/node/pull/22083
Fixes: https://github.com/nodejs/node/issues/22041
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: George Adams <george.adams@uk.ibm.com>
2018-08-13 13:12:21 +01:00
killagu
949e885148
http: fix request with option timeout and agent
When request with both timeout and agent, timeout not
work. This patch will fix it, socket timeout will set
to request timeout before socket is connected, and
socket timeout will reset to agent timeout after
response end.

Fixes: https://github.com/nodejs/node/issues/21185

PR-URL: https://github.com/nodejs/node/pull/21204
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
2018-07-13 18:44:03 +02:00