YARN-10140: TestTimelineAuthFilterForV2 fails due to login failures in branch-2.10. Contributed by Ahmed Hussein (ahussein)

This commit is contained in:
Eric E Payne 2020-02-25 16:36:50 +00:00
parent a5c3620bc2
commit 254b94bf5e
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,7 @@ import org.apache.hadoop.security.SecurityUtil;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.hadoop.security.authentication.KerberosTestUtils;
import org.apache.hadoop.security.authentication.server.KerberosAuthenticationHandler;
import org.apache.hadoop.security.authentication.util.KerberosName;
import org.apache.hadoop.security.ssl.KeyStoreTestUtil;
import org.apache.hadoop.security.token.Token;
import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager;
@ -137,6 +138,8 @@ public class TestTimelineAuthFilterForV2 {
testMiniKDC.start();
testMiniKDC.createPrincipal(
httpSpnegoKeytabFile, HTTP_USER + "/localhost");
// reset the realm after the testMiniKDC has been created
KerberosName.resetDefaultRealm();
} catch (Exception e) {
fail("Couldn't setup MiniKDC.");
}