HBASE-6632 [0.92 UNIT TESTS] testCreateTableRPCTimeOut sets rpc timeout to 1500ms and leaves it (testHundredsOfTable fails w/ 1500ms timeout)
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1375897 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
91466eb44e
commit
080b8fce76
|
@ -1113,16 +1113,21 @@ public class TestAdmin {
|
||||||
@Test
|
@Test
|
||||||
public void testCreateTableRPCTimeOut() throws Exception {
|
public void testCreateTableRPCTimeOut() throws Exception {
|
||||||
String name = "testCreateTableRPCTimeOut";
|
String name = "testCreateTableRPCTimeOut";
|
||||||
|
int oldTimeout = TEST_UTIL.getConfiguration().
|
||||||
|
getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, HConstants.DEFAULT_HBASE_RPC_TIMEOUT);
|
||||||
TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_RPC_TIMEOUT_KEY, 1500);
|
TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_RPC_TIMEOUT_KEY, 1500);
|
||||||
|
try {
|
||||||
int expectedRegions = 100;
|
int expectedRegions = 100;
|
||||||
// Use 80 bit numbers to make sure we aren't limited
|
// Use 80 bit numbers to make sure we aren't limited
|
||||||
byte [] startKey = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
|
byte [] startKey = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
|
||||||
byte [] endKey = { 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 };
|
byte [] endKey = { 9, 9, 9, 9, 9, 9, 9, 9, 9, 9 };
|
||||||
HBaseAdmin hbaseadmin = new HBaseAdmin(TEST_UTIL.getConfiguration());
|
HBaseAdmin hbaseadmin = new HBaseAdmin(TEST_UTIL.getConfiguration());
|
||||||
hbaseadmin.createTable(new HTableDescriptor(name), startKey, endKey,
|
hbaseadmin.createTable(new HTableDescriptor(name), startKey, endKey,
|
||||||
expectedRegions);
|
expectedRegions);
|
||||||
hbaseadmin.close();
|
hbaseadmin.close();
|
||||||
|
} finally {
|
||||||
|
TEST_UTIL.getConfiguration().setInt(HConstants.HBASE_RPC_TIMEOUT_KEY, oldTimeout);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue