test: refactor test-http-destroyed-socket-write2
authorSantiago Gimeno <santiago.gimeno@gmail.com>
Sat, 30 Jan 2016 10:00:20 +0000 (11:00 +0100)
committerMyles Borins <mborins@us.ibm.com>
Wed, 2 Mar 2016 22:01:11 +0000 (14:01 -0800)
commitf44c7ac43bd0401911eb098a41c29052c6fe922a
tree058f040dccfcf25b8b2548705595804ced1c8ab2
parent40fdd129c3ba3eb59b1c02d1b53df7b04266c171
test: refactor test-http-destroyed-socket-write2

Remove the limit of requests to be sent (128) as in some conditions it
was reached without the `error` event being fired, causing the test to
fail.

Remove the initial timeout.

Remove some variables used to check the validity of the test and replace
them with `common.mustCall` and `common.fail` calls.

PR-URL: https://github.com/nodejs/node/pull/4970
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
test/parallel/test-http-destroyed-socket-write2.js