test: fix flaky child-process-fork-regr-gh-2847
authorSantiago Gimeno <santiago.gimeno@gmail.com>
Wed, 24 Feb 2016 22:47:47 +0000 (23:47 +0100)
committerMyles Borins <mborins@us.ibm.com>
Mon, 21 Mar 2016 19:57:59 +0000 (12:57 -0700)
commitd681bf24b515cdcd240fc01e3cb99efb5a88d567
treee31423bcf9311e755682c7974db0e187c649debc
parent97e95d04c2071acf09051a5b1da6eff75e498223
test: fix flaky child-process-fork-regr-gh-2847

The test is still failing sometimes because when trying to establish the
second connection, the server is already closed. Bring back the code
that handled this case and was removed in the last refactoring of the
test. Also ignore the errors that might happen when sending the second
handle to the worker because it may already have exited.

PR-URL: https://github.com/nodejs/node/pull/5422
Reviewed-By: Rich Trott <rtrott@gmail.com>
test/parallel/test-child-process-fork-regr-gh-2847.js