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));