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.
The error I was getting from time to time in OS X
was:
=== release test-http-destroyed-socket-write2 ===
Path: parallel/test-http-destroyed-socket-write2
assert.js:89
throw new assert.AssertionError({
^
AssertionError: false == true
at test (/Users/sgimeno/node/node/test/parallel/test-http-destroyed-socket-write2.js:89:5)
at Immediate.write [as _onImmediate] (/Users/sgimeno/node/node/test/parallel/test-http-destroyed-socket-write2.js:29:7)
at processImmediate [as _immediateCallback] (timers.js:392:17)
Command: out/Release/node /Users/sgimeno/node/node/test/parallel/test-http-destroyed-socket-write2.js