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

(cherry picked from commit 8549fa5dc9)
This commit is contained in:
Haohui Mai 2014-11-05 15:25:35 -08:00 committed by Sangjin Lee
parent 46c7a8977a
commit da70755b4d
2 changed files with 3 additions and 4 deletions

View File

@ -21,6 +21,9 @@ Release 2.6.3 - UNRELEASED
HADOOP-10668. TestZKFailoverControllerStress#testExpireBackAndForth HADOOP-10668. TestZKFailoverControllerStress#testExpireBackAndForth
occasionally fails. (Ming Ma via cnauroth) 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 Release 2.6.2 - 2015-10-28
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

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