From 4a5fecce8837ec68ca685fbdecfca4764e34a240 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Tue, 2 Jul 2013 18:44:49 +0000 Subject: [PATCH] HBASE-8842 TestTokenAuthentication failing on hadoop2 build with "IllegalArgumentException: Can t get Kerberos realm" git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1499054 13f79535-47bb-0310-9956-ffa450edef68 --- .../hbase/security/token/TestTokenAuthentication.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java index 1546735f105..7b676eef288 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java @@ -84,6 +84,12 @@ import org.junit.experimental.categories.Category; */ @Category(MediumTests.class) public class TestTokenAuthentication { + static { + // Setting whatever system properties after recommendation from + // http://docs.oracle.com/javase/6/docs/technotes/guides/security/jgss/tutorials/KerberosReq.html + System.setProperty("java.security.krb5.realm", "hbase"); + System.setProperty("java.security.krb5.kdc", "blah"); + } private static Log LOG = LogFactory.getLog(TestTokenAuthentication.class); public static interface AuthenticationServiceSecurityInfo {}