From b0b867e977ab853d1dfc434195c486cf0ca32dab Mon Sep 17 00:00:00 2001 From: Bryan Beaudreault Date: Fri, 6 Aug 2021 12:24:07 -0400 Subject: [PATCH] HADOOP-17837: Add unresolved endpoint value to UnknownHostException (ADDENDUM) (#3276) --- .../src/test/java/org/apache/hadoop/net/TestNetUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java index c21932c2bd..0bf2c4473a 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/net/TestNetUtils.java @@ -43,6 +43,7 @@ import org.apache.hadoop.io.IOUtils; import org.apache.hadoop.security.KerberosAuthException; import org.apache.hadoop.security.NetUtilsTestResolver; +import org.apache.hadoop.test.GenericTestUtils; import org.junit.Assume; import org.junit.Before; import org.junit.BeforeClass; @@ -111,7 +112,7 @@ public void testInvalidAddress() throws Throwable { fail("Should not have connected"); } catch (UnknownHostException uhe) { LOG.info("Got exception: ", uhe); - assertEquals("invalid-test-host:0", uhe.getMessage()); + GenericTestUtils.assertExceptionContains("invalid-test-host:0", uhe); } }