Skip to content

Commit b1fd92d

Browse files
authored
HBASE-28027 Make TestClusterScopeQuotaThrottle run faster (#5355)
Signed-off-by: GeorryHuang <[email protected]>
1 parent 2fb2ae1 commit b1fd92d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestClusterScopeQuotaThrottle.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import java.util.concurrent.TimeUnit;
2929
import org.apache.hadoop.hbase.HBaseClassTestRule;
3030
import org.apache.hadoop.hbase.HBaseTestingUtil;
31-
import org.apache.hadoop.hbase.HConstants;
3231
import org.apache.hadoop.hbase.NamespaceDescriptor;
3332
import org.apache.hadoop.hbase.TableName;
3433
import org.apache.hadoop.hbase.client.Admin;
@@ -75,20 +74,23 @@ public static void setUpBeforeClass() throws Exception {
7574
TEST_UTIL.getConfiguration().setInt("hbase.hstore.compactionThreshold", 10);
7675
TEST_UTIL.getConfiguration().setInt("hbase.regionserver.msginterval", 100);
7776
TEST_UTIL.getConfiguration().setInt("hbase.client.pause", 250);
78-
TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6);
7977
TEST_UTIL.getConfiguration().setBoolean("hbase.master.enabletable.roundrobin", true);
8078
TEST_UTIL.startMiniCluster(2);
8179
TEST_UTIL.waitTableAvailable(QuotaTableUtil.QUOTA_TABLE_NAME);
8280
QuotaCache.TEST_FORCE_REFRESH = true;
8381

8482
tables = new Table[TABLE_NAMES.length];
8583
for (int i = 0; i < TABLE_NAMES.length; ++i) {
86-
tables[i] = TEST_UTIL.createTable(TABLE_NAMES[i], FAMILY);
84+
TEST_UTIL.createTable(TABLE_NAMES[i], FAMILY);
8785
TEST_UTIL.waitTableAvailable(TABLE_NAMES[i]);
86+
tables[i] = TEST_UTIL.getConnection().getTableBuilder(TABLE_NAMES[i], null)
87+
.setOperationTimeout(10000).build();
8888
}
8989
TEST_UTIL.getAdmin().createNamespace(NamespaceDescriptor.create(NAMESPACE).build());
90-
table = TEST_UTIL.createTable(TABLE_NAME, FAMILY, SPLITS);
90+
TEST_UTIL.createTable(TABLE_NAME, FAMILY, SPLITS);
9191
TEST_UTIL.waitTableAvailable(TABLE_NAME);
92+
table = TEST_UTIL.getConnection().getTableBuilder(TABLE_NAME, null).setOperationTimeout(10000)
93+
.build();
9294
}
9395

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

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

0 commit comments

Comments
 (0)