test: fix `http-upgrade-agent` flakiness
authorSantiago Gimeno <santiago.gimeno@gmail.com>
Sun, 3 Jan 2016 17:10:22 +0000 (18:10 +0100)
committerMyles Borins <mborins@us.ibm.com>
Mon, 15 Feb 2016 19:30:23 +0000 (11:30 -0800)
commit3d5bc697965711e8d4231527254cb7f6e02813f0
tree5b0d303133512c9431588f73d0d6007c302b5bf4
parentec24d3767b8db3c4099e8a529acacc99f0374f5c
test: fix `http-upgrade-agent` flakiness

It's not guaranteed that the socket data is received in the same chunk
as the upgrade response. Listen for the `data` event to make sure all
the data is received.

PR-URL: https://github.com/nodejs/node/pull/4520
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
test/parallel/test-http-upgrade-agent.js