You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ph...@apache.org on 2016/07/29 23:02:59 UTC
svn commit: r1754583 - in /zookeeper/branches/branch-3.5: CHANGES.txt
src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java
Author: phunt
Date: Fri Jul 29 23:02:58 2016
New Revision: 1754583
URL: http://svn.apache.org/viewvc?rev=1754583&view=rev
Log:
ZOOKEEPER-1256: ClientPortBindTest is failing on Mac OS X (Camille via phunt)
Modified:
zookeeper/branches/branch-3.5/CHANGES.txt
zookeeper/branches/branch-3.5/src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java
Modified: zookeeper/branches/branch-3.5/CHANGES.txt
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.5/CHANGES.txt?rev=1754583&r1=1754582&r2=1754583&view=diff
==============================================================================
--- zookeeper/branches/branch-3.5/CHANGES.txt (original)
+++ zookeeper/branches/branch-3.5/CHANGES.txt Fri Jul 29 23:02:58 2016
@@ -8,6 +8,9 @@ BUGFIXES:
ZOOKEEPER-2477: documentation should refer to Java cli shell and not
C cli shell (Abraham Fine via phunt)
+ ZOOKEEPER-1256: ClientPortBindTest is failing on Mac OS X
+ (Camille via phunt)
+
IMPROVEMENTS:
Modified: zookeeper/branches/branch-3.5/src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java
URL: http://svn.apache.org/viewvc/zookeeper/branches/branch-3.5/src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java?rev=1754583&r1=1754582&r2=1754583&view=diff
==============================================================================
--- zookeeper/branches/branch-3.5/src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java (original)
+++ zookeeper/branches/branch-3.5/src/java/test/org/apache/zookeeper/test/ClientPortBindTest.java Fri Jul 29 23:02:58 2016
@@ -60,8 +60,12 @@ public class ClientPortBindTest extends
NetworkInterface i = intfs.nextElement();
if (i.isLoopback()) {
Enumeration<InetAddress> addrs = i.getInetAddresses();
- if (addrs.hasMoreElements()) {
- bindAddress = addrs.nextElement().getHostAddress();
+ while (addrs.hasMoreElements()) {
+ InetAddress a = addrs.nextElement();
+ if(a.isLoopbackAddress()) {
+ bindAddress = a.getHostAddress();
+ break;
+ }
}
}
}