basho/rebar — pull request #168 by tomas-abrahamsson (2011-12-29 23:19:44+00:00)
Title: Error report killing inet_gethost_native after eunit

This is a change to not kill the inet_gethost_native process. That process is started on demand to do name lookups, so it might well happen that it is started by an eunit test case. If so, the cleanup after eunit will kill it, producing printouts like this one:

prompt$ rebar eunit
==> dummy (eunit)
Test passed.

=ERROR REPORT==== 29-Dec-2011::23:22:11 ===
** Generic server inet_gethost_native_sup terminating
** Last message in was {'EXIT',<0.62.0>,killed}
** When Server state == {state,inet_gethost_native,undefined,<0.62.0>,
{local,inet_gethost_native_sup}}
** Reason for termination ==
** killed

The following test case is sufficient to provoke the printout above:

x_test() ->
{ok, _Hostent} = inet:gethostbyname(localhost).

BRs
Tomas