On some operating systems / configurations (notably my laptop running OS X ) the resolution of potential hostnames which resolve to the local machine which takes place in HostnameAliasImpl can take a long time due to fruitless lookups. This can cause various system tests to fail.
To prevent these failures
- Do not include the hostname virtual host alias where it is not needed in the system tests
- Reorder the list of InetAddress objects that are iterated over in the resolution phase so that addresses more likely to resolve (like the loopback interface) are processed first