test: fix test-net-settimeout flakiness
Checklist
-
tests and code linting passes -
the commit message follows commit guidelines
Affected core subsystem(s)
test
Description of change
Wait for the data to be received by the socket before creating the
clean-up timer. This way, a possible (though unlikely) ECONNRESET
error can be avoided.
Failure in CI: https://ci.nodejs.org/job/node-test-binary-arm/RUN_SUBSET=6,nodes=pi1-raspbian-wheezy/1686/
1) test-net-settimeout.js
----------------------------------------------
# events.js:154
# throw er; // Unhandled 'error' event
# ^
#
# Error: read ECONNRESET
# at exports._errnoException (util.js:893:11)
# at TCP.onread (net.js:550:26)
==============================================