HADOOP-17837: Add unresolved endpoint value to UnknownHostException (ADDENDUM) (#3276)

This commit is contained in:
Bryan Beaudreault 2021-08-06 12:24:07 -04:00 committed by GitHub
parent e85c44657c
commit b0b867e977
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
}