Skip to content

Commit

Permalink
HBASE-28027 Make TestClusterScopeQuotaThrottle run faster (apache#5355)
Browse files Browse the repository at this point in the history
Signed-off-by: GeorryHuang <huangzhuoyue@apache.org>
Apache9 authored Aug 17, 2023
1 parent 2fb2ae1 commit b1fd92d
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@
import java.util.concurrent.TimeUnit;
import org.apache.hadoop.hbase.HBaseClassTestRule;
import org.apache.hadoop.hbase.HBaseTestingUtil;
import org.apache.hadoop.hbase.HConstants;
import org.apache.hadoop.hbase.NamespaceDescriptor;
import org.apache.hadoop.hbase.TableName;
import org.apache.hadoop.hbase.client.Admin;
@@ -75,20 +74,23 @@ public static void setUpBeforeClass() throws Exception {
TEST_UTIL.getConfiguration().setInt("hbase.hstore.compactionThreshold", 10);
TEST_UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 100);
TEST_UTIL.getConfiguration().setInt("hbase.client.pause", 250);
TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6);
TEST_UTIL.getConfiguration().setBoolean("hbase.master.enabletable.roundrobin", true);
TEST_UTIL.startMiniCluster(2);
TEST_UTIL.waitTableAvailable(QuotaTableUtil.QUOTA_TABLE_NAME);
QuotaCache.TEST_FORCE_REFRESH = true;

tables = new Table[TABLE_NAMES.length];
for (int i = 0; i < TABLE_NAMES.length; ++i) {
tables[i] = TEST_UTIL.createTable(TABLE_NAMES[i], FAMILY);
TEST_UTIL.createTable(TABLE_NAMES[i], FAMILY);
TEST_UTIL.waitTableAvailable(TABLE_NAMES[i]);
tables[i] = TEST_UTIL.getConnection().getTableBuilder(TABLE_NAMES[i], null)
.setOperationTimeout(10000).build();
}
TEST_UTIL.getAdmin().createNamespace(NamespaceDescriptor.create(NAMESPACE).build());
table = TEST_UTIL.createTable(TABLE_NAME, FAMILY, SPLITS);
TEST_UTIL.createTable(TABLE_NAME, FAMILY, SPLITS);
TEST_UTIL.waitTableAvailable(TABLE_NAME);
table = TEST_UTIL.getConnection().getTableBuilder(TABLE_NAME, null).setOperationTimeout(10000)
.build();
}

@AfterClass
@@ -180,7 +182,6 @@ public void testUserClusterScopeQuota() throws Exception {
triggerUserCacheRefresh(TEST_UTIL, true, TABLE_NAMES);
}

@org.junit.Ignore
@Test // Spews the log w/ triggering of scheduler? HBASE-24035
public void testUserNamespaceClusterScopeQuota() throws Exception {
final Admin admin = TEST_UTIL.getAdmin();

0 comments on commit b1fd92d

Please sign in to comment.