Browse Source

HADOOP-11267. TestSecurityUtil fails when run with JDK8 because of empty principal names. Contributed by Stephen Chu.

(cherry picked from commit 8549fa5dc95d3e94e49c9b92734aec0509693a2a)
Haohui Mai 10 năm trước cách đây
mục cha
commit
da70755b4d

+ 3 - 0
hadoop-common-project/hadoop-common/CHANGES.txt

@@ -21,6 +21,9 @@ Release 2.6.3 - UNRELEASED
     HADOOP-10668. TestZKFailoverControllerStress#testExpireBackAndForth
     occasionally fails. (Ming Ma via cnauroth)
 
+    HADOOP-11267. TestSecurityUtil fails when run with JDK8 because of empty
+    principal names. (Stephen Chu via wheat9)
+
 Release 2.6.2 - 2015-10-28
 
   INCOMPATIBLE CHANGES

+ 0 - 4
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/security/TestSecurityUtil.java

@@ -54,12 +54,8 @@ public class TestSecurityUtil {
         (null));
     assertFalse(SecurityUtil.isTGSPrincipal
         (new KerberosPrincipal("blah")));
-    assertFalse(SecurityUtil.isTGSPrincipal
-        (new KerberosPrincipal("")));
     assertFalse(SecurityUtil.isTGSPrincipal
         (new KerberosPrincipal("krbtgt/hello")));
-    assertFalse(SecurityUtil.isTGSPrincipal
-        (new KerberosPrincipal("/@")));
     assertFalse(SecurityUtil.isTGSPrincipal
         (new KerberosPrincipal("krbtgt/foo@FOO")));
   }