HADOOP-6747. TestNetUtils fails on Mac OS X (Todd Lipcon via jghoman)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@949330 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jakob Homan 2010-05-29 00:49:54 +00:00
parent 9dd25df80e
commit aecf7afba6
2 changed files with 7 additions and 0 deletions

View File

@ -52,6 +52,8 @@ Trunk (unreleased changes)
HADOOP-6669. Respect compression configuration when creating DefaultCodec HADOOP-6669. Respect compression configuration when creating DefaultCodec
instances. (Koji Noguchi via cdouglas) instances. (Koji Noguchi via cdouglas)
HADOOP-6747. TestNetUtils fails on Mac OS X. (Todd Lipcon via jghoman)
Release 0.21.0 - Unreleased Release 0.21.0 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -22,6 +22,7 @@ import static org.junit.Assert.*;
import java.net.Socket; import java.net.Socket;
import java.net.ConnectException; import java.net.ConnectException;
import java.net.SocketException;
import java.net.InetSocketAddress; import java.net.InetSocketAddress;
import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.conf.Configuration;
@ -51,6 +52,10 @@ public class TestNetUtils {
} catch (ConnectException ce) { } catch (ConnectException ce) {
System.err.println("Got exception: " + ce); System.err.println("Got exception: " + ce);
assertTrue(ce.getMessage().contains("resulted in a loopback")); 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"));
} }
} }
} }