test: fix flaky test-net-socket-local-address
authorcjihrig <cjihrig@gmail.com>
Tue, 12 Jan 2016 17:18:40 +0000 (12:18 -0500)
committerMyles Borins <mborins@us.ibm.com>
Mon, 15 Feb 2016 19:30:23 +0000 (11:30 -0800)
commitd615757da23f27a9ac4c2cd62537f08a8d7c157d
tree6ac4d165da759a7e5f5736a7417491015d08107c
parent40c8e6d75d85ff3f8d491146f330aa9cd68d0c92
test: fix flaky test-net-socket-local-address

Prior to this commit, the test was flaky because it was
executing the majority of its logic in a function called from
the client and multiple events on the server. This commit
simplifies the test by separating the server's connection and
listening events, and isolating the client logic.

Refs: https://github.com/nodejs/node/pull/4476
Refs: https://github.com/nodejs/node/pull/4644
PR-URL: https://github.com/nodejs/node/pull/4650
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
test/parallel/test-net-socket-local-address.js