HBASE-16231 Support client keytab login for integration tests
This commit is contained in:
parent
09c7b1e962
commit
9dbeb593b5
|
@ -117,6 +117,17 @@ public abstract class IntegrationTestBase extends AbstractHBaseTool {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int doWork() throws Exception {
|
protected int doWork() throws Exception {
|
||||||
|
ChoreService choreService = null;
|
||||||
|
|
||||||
|
// Launches chore for refreshing kerberos credentials if security is enabled.
|
||||||
|
// Please see http://hbase.apache.org/book.html#_running_canary_in_a_kerberos_enabled_cluster
|
||||||
|
// for more details.
|
||||||
|
final ScheduledChore authChore = AuthUtil.getAuthChore(conf);
|
||||||
|
if (authChore != null) {
|
||||||
|
choreService = new ChoreService("INTEGRATION_TEST");
|
||||||
|
choreService.scheduleChore(authChore);
|
||||||
|
}
|
||||||
|
|
||||||
setUp();
|
setUp();
|
||||||
int result = -1;
|
int result = -1;
|
||||||
try {
|
try {
|
||||||
|
@ -125,6 +136,10 @@ public abstract class IntegrationTestBase extends AbstractHBaseTool {
|
||||||
cleanUp();
|
cleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (choreService != null) {
|
||||||
|
choreService.shutdown();
|
||||||
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue