[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-1957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

naras mungrak updated ZOOKEEPER-1957:
-------------------------------------

    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:

{noformat}
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)
{noformat}

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

  was:
This 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:

{noformat}
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)
{noformat}

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


> ReconfigTest can fail when checking remote peer MXBean ElectionAddress
> ----------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-1957
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1957
>             Project: ZooKeeper
>          Issue Type: Test
>          Components: jmx
>    Affects Versions: 3.4.6
>            Reporter: Bill Havanki
>            Priority: Minor
>              Labels: testing
>
> 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:
> {noformat}
> 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)
> {noformat}
> 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".



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to