Backport of #9098: test: fix flaky test-child-process-fork-dgram
Backport of #9098. /cc @TheAlphaNerd
Description of change
test-child-process-fork-dgram
is unreliable on some platforms,
especially FreeBSD and AIX within the project's continuous integration
testing. It has also been observed to be flaky on macos.
- Confirm child has received the server before sending packets
- Close the server instance on the parent or child after receiving a
Refs: https://github.com/nodejs/node/pull/8697 Fixes: https://github.com/nodejs/node/issues/8949 Fixes: https://github.com/nodejs/node/issues/8271 PR-URL: https://github.com/nodejs/node/pull/9098 Reviewed-By: Santiago Gimeno santiago.gimeno@gmail.com