Drop host name resolution failure test

This test seems to be causing us problems, some build systems will
correctly fail the resolution and the test passes like we want it to,
but others incorrectly resolve the address due to misconfiguration
of the local name service, causing the test to fail, and the Maven
build to abort.

Just drop the test.  Its more effort to maintain than it is worth
to verify that we caught and rethrew this one UnknownHostException
like we want.  I've already had 2 bugs opened over this test case
failing for others who are trying to build from source.

Bug: issue 489
Change-Id: Ia9eb79ae97841003e0d1e82bf0deae4ca61b97ad
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2010-03-08 07:21:18 -08:00
parent afd1514e5e
commit 8a8d4e14c3

View File

@@ -116,13 +116,5 @@ public class SocketUtilTest extends TestCase {
resolve("[localhost]:1234", 80));
assertEquals(new InetSocketAddress(getByName("localhost"), 80), //
resolve("[localhost]", 80));
String badname = "this-name-is-not-supposed-to-resolve-on-your-network";
try {
resolve(badname + ":12", 80);
fail("did not throw exception");
} catch (IllegalArgumentException e) {
assertEquals("unknown host: " + badname + ":12", e.getMessage());
}
}
}