From 9e6760b20adae91229949e11a04dd739d441429d Mon Sep 17 00:00:00 2001 From: slfan1989 Date: Thu, 18 Aug 2022 20:17:28 +0800 Subject: [PATCH] YARN-9708. Fix Junit Test Error. --- .../router/secure/TestRouterDelegationTokenSecretManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/secure/TestRouterDelegationTokenSecretManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/secure/TestRouterDelegationTokenSecretManager.java index cf37c717f5e1e..c98f9bae3742a 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/secure/TestRouterDelegationTokenSecretManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-router/src/test/java/org/apache/hadoop/yarn/server/router/secure/TestRouterDelegationTokenSecretManager.java @@ -30,6 +30,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.IOException; import java.util.Arrays; public class TestRouterDelegationTokenSecretManager extends AbstractSecureRouterTest { @@ -83,7 +84,7 @@ public void testRouterRemoveStoredMasterKey() throws Exception { // Get DelegationKey DelegationKey paramKey = new DelegationKey(1234, 4321, "keyBytes".getBytes()); - LambdaTestUtils.intercept(YarnException.class, + LambdaTestUtils.intercept(IOException.class, "GetMasterKey with keyID: " + storeKey.getKeyId() + " does not exist.", () -> secretManager.getMasterKeyByDelegationKey(paramKey));