HBASE-13280 TestSecureRPC failed
This commit is contained in:
parent
535ebbfde9
commit
27cf749af8
|
@ -26,7 +26,6 @@ import static org.junit.Assert.assertSame;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -72,7 +71,7 @@ public class TestSecureRPC {
|
|||
|
||||
private static MiniKdc KDC;
|
||||
|
||||
private static String HOST;
|
||||
private static String HOST = "localhost";
|
||||
|
||||
private static String PRINCIPAL;
|
||||
|
||||
|
@ -82,7 +81,6 @@ public class TestSecureRPC {
|
|||
conf.put(MiniKdc.DEBUG, true);
|
||||
KDC = new MiniKdc(conf, new File(TEST_UTIL.getDataTestDir("kdc").toUri().getPath()));
|
||||
KDC.start();
|
||||
HOST = InetAddress.getLocalHost().getHostName();
|
||||
PRINCIPAL = "hbase/" + HOST;
|
||||
KDC.createPrincipal(KEYTAB_FILE, PRINCIPAL);
|
||||
HBaseKerberosUtils.setKeytabFileForTesting(KEYTAB_FILE.getAbsolutePath());
|
||||
|
|
|
@ -28,7 +28,6 @@ import static org.junit.Assert.assertTrue;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.hadoop.conf.Configuration;
|
||||
|
@ -51,7 +50,7 @@ public class TestUsersOperationsWithSecureHadoop {
|
|||
|
||||
private static MiniKdc KDC;
|
||||
|
||||
private static String HOST;
|
||||
private static String HOST = "localhost";
|
||||
|
||||
private static String PRINCIPAL;
|
||||
|
||||
|
@ -61,7 +60,6 @@ public class TestUsersOperationsWithSecureHadoop {
|
|||
conf.put(MiniKdc.DEBUG, true);
|
||||
KDC = new MiniKdc(conf, new File(TEST_UTIL.getDataTestDir("kdc").toUri().getPath()));
|
||||
KDC.start();
|
||||
HOST = InetAddress.getLocalHost().getHostName();
|
||||
PRINCIPAL = "hbase/" + HOST;
|
||||
KDC.createPrincipal(KEYTAB_FILE, PRINCIPAL);
|
||||
HBaseKerberosUtils.setKeytabFileForTesting(KEYTAB_FILE.getAbsolutePath());
|
||||
|
|
|
@ -22,7 +22,6 @@ import static org.junit.Assert.assertTrue;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.hadoop.hbase.HBaseTestingUtility;
|
||||
|
@ -70,7 +69,7 @@ public class TestGenerateDelegationToken {
|
|||
.getPath());
|
||||
private static MiniKdc KDC;
|
||||
|
||||
private static String HOST;
|
||||
private static String HOST = "localhost";
|
||||
|
||||
private static String USERNAME = System.getProperty("user.name");
|
||||
|
||||
|
@ -82,7 +81,6 @@ public class TestGenerateDelegationToken {
|
|||
conf.put(MiniKdc.DEBUG, true);
|
||||
KDC = new MiniKdc(conf, new File(TEST_UTIL.getDataTestDir("kdc").toUri().getPath()));
|
||||
KDC.start();
|
||||
HOST = InetAddress.getLocalHost().getHostName();
|
||||
PRINCIPAL = USERNAME + "/" + HOST;
|
||||
KDC.createPrincipal(KEYTAB_FILE, PRINCIPAL);
|
||||
TEST_UTIL.getConfiguration().setBoolean("ipc.client.fallback-to-simple-auth-allowed", true);
|
||||
|
|
Loading…
Reference in New Issue