HBASE-7966 ACL tests fail on trunk (flaky)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1452161 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cb62d5025f
commit
70b1899e88
|
@ -869,18 +869,18 @@ public class HConnectionManager {
|
|||
}
|
||||
|
||||
/*
|
||||
* @param True if table is online
|
||||
* @param enabled True if table is enabled
|
||||
*/
|
||||
private boolean testTableOnlineState(byte [] tableName, boolean online)
|
||||
private boolean testTableOnlineState(byte [] tableName, boolean enabled)
|
||||
throws IOException {
|
||||
if (Bytes.equals(tableName, HConstants.ROOT_TABLE_NAME)) {
|
||||
// The root region is always enabled
|
||||
return online;
|
||||
return enabled;
|
||||
}
|
||||
String tableNameStr = Bytes.toString(tableName);
|
||||
ZooKeeperKeepAliveConnection zkw = getKeepAliveZooKeeperWatcher();
|
||||
try {
|
||||
if (online) {
|
||||
if (enabled) {
|
||||
return ZKTableReadOnly.isEnabledTable(zkw, tableNameStr);
|
||||
}
|
||||
return ZKTableReadOnly.isDisabledTable(zkw, tableNameStr);
|
||||
|
|
|
@ -27,6 +27,7 @@ import java.security.PrivilegedExceptionAction;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
@ -90,7 +91,14 @@ public class TestAccessControlFilter {
|
|||
@Test
|
||||
public void testQualifierAccess() throws Exception {
|
||||
final HTable table = TEST_UTIL.createTable(TABLE, FAMILY);
|
||||
try {
|
||||
doQualifierAccess(table);
|
||||
} finally {
|
||||
table.close();
|
||||
}
|
||||
}
|
||||
|
||||
private void doQualifierAccess(final HTable table) throws IOException, InterruptedException {
|
||||
// set permissions
|
||||
ADMIN.runAs(new PrivilegedExceptionAction<Object>() {
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue