You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2021/09/27 01:13:37 UTC

[hadoop] branch trunk updated: HADOOP-17910. [JDK 17] TestNetUtils fails (#3481)

This is an automated email from the ASF dual-hosted git repository.

aajisaka pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 9d44f50  HADOOP-17910. [JDK 17] TestNetUtils fails (#3481)
9d44f50 is described below

commit 9d44f503dbf2f23faa162def60e46c5c8602cce6
Author: Viraj Jasani <vj...@apache.org>
AuthorDate: Mon Sep 27 06:42:47 2021 +0530

    HADOOP-17910. [JDK 17] TestNetUtils fails (#3481)
    
    Signed-off-by: Akira Ajisaka <aa...@apache.org>
---
 .../src/test/java/org/apache/hadoop/net/TestNetUtils.java        | 9 ++++++++-
 1 file changed, 8 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 ad5d8d7..4b18d74 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
@@ -45,6 +45,8 @@ import org.apache.hadoop.security.KerberosAuthException;
 import org.apache.hadoop.security.NetUtilsTestResolver;
 import org.apache.hadoop.test.GenericTestUtils;
 import org.apache.hadoop.test.LambdaTestUtils;
+import org.apache.hadoop.util.Shell;
+
 import org.junit.Assume;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -113,7 +115,12 @@ public class TestNetUtils {
       fail("Should not have connected");
     } catch (UnknownHostException uhe) {
       LOG.info("Got exception: ", uhe);
-      GenericTestUtils.assertExceptionContains("invalid-test-host:0", uhe);
+      if (Shell.isJavaVersionAtLeast(17)) {
+        GenericTestUtils
+            .assertExceptionContains("invalid-test-host/<unresolved>:0", uhe);
+      } else {
+        GenericTestUtils.assertExceptionContains("invalid-test-host:0", uhe);
+      }
     }
   }
 

---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org