test: fix tls-no-rsa-key flakiness
authorSantiago Gimeno <santiago.gimeno@gmail.com>
Thu, 26 Nov 2015 21:58:51 +0000 (22:58 +0100)
committerMyles Borins <mborins@us.ibm.com>
Mon, 15 Feb 2016 19:30:23 +0000 (11:30 -0800)
commitf205e9920eb494fb5f7bb84c9f781ff06540acb2
tree690528bc97df9a7561fc69214732450fdc41ddf8
parentb66db49f9490a2f6dc39350ebc0e87d909993d2a
test: fix tls-no-rsa-key flakiness

In some conditions it can happen that the client-side socket is destroyed
before the server-side socket has gracefully closed, thus causing a
'ECONNRESET' error in this socket. To solve this, wait in the client-side
socket for the 'end' event before closing it.

PR-URL: https://github.com/nodejs/node/pull/4043
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
test/parallel/test-tls-no-rsa-key.js