Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1957

ReconfigTest can fail when checking remote peer MXBean ElectionAddress

    XMLWordPrintableJSON

    Details

    • Type: Test
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.4.6
    • Fix Version/s: None
    • Component/s: jmx
    • Labels:

      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".

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bhavanki Bill Havanki
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: