joyent/node — pull request #8121 by misterdjules (2014-08-09 19:48:53+00:00)
Title: tests: do not hardcode service name in test-dns.

Instead of hard-coding http service name in test-dns, retrieve it from /etc/services. This is not ideal, but it's still better than hard-coding it.

I initially implemented it by reading from /etc/services asynchronously, but it lead to me writing line parsing code that seemed a bit overkill in this tiny utility module. I don't think it's worth it now, because we don't run tests concurrently. If you'd rather have me revert to this async behavior, I'll be happy to update the PR.

Tested on OS X, Windows, Ubuntu and SmartOS.

Fixes #8047.