Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
2.2.17, 3.0.21, 3.11.7, 4.0-alpha4, 4.0
-
None
-
Correctness - Test Failure
-
Normal
-
Low Hanging Fruit
-
Unit Test
-
All
-
None
-
Description
Many of the unit tests in Jenkins fail because of the use of `InetAddress.getLocalHost()` in the test classes.
The Jenkins agents need a public ipaddress (and a hostname associated to it) so the Jenkins master can connect to them (agents can be hosted externally, by donating third-parties).
The call to `InetAddress.getLocalHost()` can resolve to a hostname that can't be looked up.
Not only can it not be listed in `/etc/hosts`, but we don't want it to be either (in case of accidental external port opening if the hostname points to the public ipaddress). (Which is also ASF policy on this infrastructure.)
The unit test code needs to replace these code occurrences with the call to `FBUtilities.getLocalAddress()`