Browse Source

HADOOP-13815. TestKMS#testDelegationTokensOpsSimple and TestKMS#testDelegationTokensOpsKerberized Fails in Trunk.

Xiao Chen 8 years ago
parent
commit
61c0bedf77

+ 4 - 1
hadoop-common-project/hadoop-kms/src/test/java/org/apache/hadoop/crypto/key/kms/server/TestKMS.java

@@ -1821,8 +1821,11 @@ public class TestKMS {
                 Assert.fail("client should not be allowed to renew token with"
                     + "renewer=client1");
               } catch (Exception e) {
+                final DelegationTokenIdentifier identifier =
+                    (DelegationTokenIdentifier) token.decodeIdentifier();
                 GenericTestUtils.assertExceptionContains(
-                    "tries to renew a token with renewer", e);
+                    "tries to renew a token (" + identifier
+                        + ") with non-matching renewer", e);
               }
             }