diff options
author | Robert Nagy <ronagy@icloud.com> | 2019-06-07 14:20:43 +0200 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-07-14 21:48:21 -0700 |
commit | 461bf36d701f3f7c669e2d916d5a5bc17fc447bf (patch) | |
tree | de2d9b1288388fd24591210d904af0b9ea14be09 /test/parallel/test-http-client-timeout-on-connect.js | |
parent | 2550ddb04909f19068e947a18681e6c675346e42 (diff) | |
download | android-node-v8-461bf36d701f3f7c669e2d916d5a5bc17fc447bf.tar.gz android-node-v8-461bf36d701f3f7c669e2d916d5a5bc17fc447bf.tar.bz2 android-node-v8-461bf36d701f3f7c669e2d916d5a5bc17fc447bf.zip |
http: fix test where aborted should not be emitted
PR-URL: https://github.com/nodejs/node/pull/20077
Fixes: https://github.com/nodejs/node/issues/20107
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Diffstat (limited to 'test/parallel/test-http-client-timeout-on-connect.js')
-rw-r--r-- | test/parallel/test-http-client-timeout-on-connect.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/test/parallel/test-http-client-timeout-on-connect.js b/test/parallel/test-http-client-timeout-on-connect.js index 3a0098229d..d2c6975e25 100644 --- a/test/parallel/test-http-client-timeout-on-connect.js +++ b/test/parallel/test-http-client-timeout-on-connect.js @@ -23,8 +23,7 @@ server.listen(0, common.localhostIPv4, common.mustCall(() => { })); })); req.on('timeout', common.mustCall(() => req.abort())); - req.on('error', common.mustCall((err) => { - assert.strictEqual(err.message, 'socket hang up'); + req.on('abort', common.mustCall(() => { server.close(); })); })); |