HBASE-16231 Support client keytab login for integration tests
This commit is contained in:
parent
66c68f8ea3
commit
84b7010a30
|
@ -117,6 +117,17 @@ public abstract class IntegrationTestBase extends AbstractHBaseTool {
|
|||
|
||||
@Override
|
||||
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();
|
||||
int result = -1;
|
||||
try {
|
||||
|
@ -125,6 +136,10 @@ public abstract class IntegrationTestBase extends AbstractHBaseTool {
|
|||
cleanUp();
|
||||
}
|
||||
|
||||
if (choreService != null) {
|
||||
choreService.shutdown();
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue