Description
CThis happens most of the time when I run the ReconfigTest unit test on Mac OS X Mavericks, using Java 6 or 7. I get failures like this:
Mismatches ElectionAddress! expected:<[127.0.0.1]:12369> but was:<[localhost]:12369> junit.framework.AssertionFailedError: Mismatches ElectionAddress! expected:<[127.0.0.1]:12369> but was:<[localhost]:12369> at org.apache.zookeeper.test.ReconfigTest.assertRemotePeerMXBeanAttributes(ReconfigTest.java:967) at org.apache.zookeeper.test.ReconfigTest.testJMXBeanAfterRoleChange(ReconfigTest.java:887) at org.apache.zookeeper.JUnit4ZKTestRunner$LoggedInvokeMethod.evaluate(JUnit4ZKTestRunner.java:52)
It has to do with RemotePeerBean.getElectionAddress(), which has an InetAddress of "localhost/127.0.0.1" and picks "localhost" over the IP address. I'm not sure if the IP address should have been picked, or if the test should allow "localhost".