diff --git a/CHANGES.txt b/CHANGES.txt index 4ba0862a73a..d19402f0464 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -52,6 +52,8 @@ Trunk (unreleased changes) HADOOP-6669. Respect compression configuration when creating DefaultCodec instances. (Koji Noguchi via cdouglas) + HADOOP-6747. TestNetUtils fails on Mac OS X. (Todd Lipcon via jghoman) + Release 0.21.0 - Unreleased INCOMPATIBLE CHANGES diff --git a/src/test/core/org/apache/hadoop/net/TestNetUtils.java b/src/test/core/org/apache/hadoop/net/TestNetUtils.java index 52fb2090d5c..e5b6a9c3b04 100644 --- a/src/test/core/org/apache/hadoop/net/TestNetUtils.java +++ b/src/test/core/org/apache/hadoop/net/TestNetUtils.java @@ -22,6 +22,7 @@ import java.net.Socket; import java.net.ConnectException; +import java.net.SocketException; import java.net.InetSocketAddress; import org.apache.hadoop.conf.Configuration; @@ -51,6 +52,10 @@ public void testAvoidLoopbackTcpSockets() throws Exception { } catch (ConnectException ce) { System.err.println("Got exception: " + ce); assertTrue(ce.getMessage().contains("resulted in a loopback")); + } catch (SocketException se) { + // Some TCP stacks will actually throw their own Invalid argument exception + // here. This is also OK. + assertTrue(se.getMessage().contains("Invalid argument")); } } }