Index: hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java =================================================================== --- hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java (revision 1512077) +++ hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin.java (working copy) @@ -112,7 +112,7 @@ public void tearDown() throws Exception { } - @Test + @Test (timeout=300000) public void testSplitFlushCompactUnknownTable() throws InterruptedException { final String unknowntable = "fubar"; Exception exception = null; @@ -140,7 +140,7 @@ assertTrue(exception instanceof TableNotFoundException); } - @Test + @Test (timeout=300000) public void testDeleteEditUnknownColumnFamilyAndOrTable() throws IOException { // Test we get exception if we try to final String nonexistent = "nonexistent"; @@ -233,7 +233,7 @@ } } - @Test + @Test (timeout=300000) public void testDisableAndEnableTable() throws IOException { final byte [] row = Bytes.toBytes("row"); final byte [] qualifier = Bytes.toBytes("qualifier"); @@ -277,7 +277,7 @@ ht.close(); } - @Test + @Test (timeout=300000) public void testDisableAndEnableTables() throws IOException { final byte [] row = Bytes.toBytes("row"); final byte [] qualifier = Bytes.toBytes("qualifier"); @@ -328,7 +328,7 @@ ht2.close(); } - @Test + @Test (timeout=300000) public void testCreateTable() throws IOException { HTableDescriptor [] tables = admin.listTables(); int numTables = tables.length; @@ -341,7 +341,7 @@ TableName.valueOf("testCreateTable"))); } - @Test + @Test (timeout=300000) public void testGetTableDescriptor() throws IOException { HColumnDescriptor fam1 = new HColumnDescriptor("fam1"); HColumnDescriptor fam2 = new HColumnDescriptor("fam2"); @@ -357,7 +357,7 @@ table.close(); } - @Test + @Test (timeout=300000) public void testHColumnValidName() { boolean exceptionThrown; try { @@ -372,7 +372,7 @@ * @throws IOException * @throws InterruptedException */ - @Test + @Test (timeout=300000) public void testOnlineChangeTableSchema() throws IOException, InterruptedException { final TableName tableName = TableName.valueOf("changeTableSchemaOnline"); @@ -461,7 +461,7 @@ assertFalse(this.admin.tableExists(tableName)); } - @Test + @Test (timeout=300000) public void testShouldFailOnlineSchemaUpdateIfOnlineSchemaIsNotEnabled() throws Exception { final byte[] tableName = Bytes.toBytes("changeTableSchemaOnlineFailure"); @@ -548,7 +548,7 @@ } } - @Test + @Test (timeout=300000) public void testCreateTableNumberOfRegions() throws IOException, InterruptedException { byte[] tableName = Bytes.toBytes("testCreateTableNumberOfRegions"); HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(tableName)); @@ -597,7 +597,7 @@ ht5.close(); } - @Test + @Test (timeout=300000) public void testCreateTableWithRegions() throws IOException, InterruptedException { byte[] tableName = Bytes.toBytes("testCreateTableWithRegions"); @@ -772,7 +772,7 @@ ladmin.close(); } - @Test + @Test (timeout=300000) public void testTableAvailableWithRandomSplitKeys() throws Exception { byte[] tableName = Bytes.toBytes("testTableAvailableWithRandomSplitKeys"); HTableDescriptor desc = new HTableDescriptor(TableName.valueOf(tableName)); @@ -786,8 +786,8 @@ boolean tableAvailable = admin.isTableAvailable(Bytes.toString(tableName), splitKeys); assertFalse("Table should be created with 1 row in META", tableAvailable); } - - @Test + + @Test (timeout=300000) public void testCreateTableWithOnlyEmptyStartRow() throws IOException { byte[] tableName = Bytes.toBytes("testCreateTableWithOnlyEmptyStartRow"); byte[][] splitKeys = new byte[1][]; @@ -800,8 +800,8 @@ } catch (IllegalArgumentException e) { } } - - @Test + + @Test (timeout=300000) public void testCreateTableWithEmptyRowInTheSplitKeys() throws IOException{ byte[] tableName = Bytes.toBytes("testCreateTableWithEmptyRowInTheSplitKeys"); byte[][] splitKeys = new byte[3][]; @@ -817,7 +817,7 @@ } } - @Test + @Test (timeout=300000) public void testTableExist() throws IOException { final byte [] table = Bytes.toBytes("testTableExist"); boolean exist; @@ -833,7 +833,7 @@ * @throws Exception * @throws IOException */ - @Test + @Test (timeout=300000) public void testForceSplit() throws Exception { byte[][] familyNames = new byte[][] { Bytes.toBytes("cf") }; int[] rowCounts = new int[] { 6000 }; @@ -850,7 +850,7 @@ * * @throws IOException */ - @Test + @Test (timeout=300000) public void testEnableTableRoundRobinAssignment() throws IOException { byte[] tableName = Bytes.toBytes("testEnableTableAssignment"); byte[][] splitKeys = { new byte[] { 1, 1, 1 }, new byte[] { 2, 2, 2 }, @@ -907,7 +907,7 @@ * @throws Exception * @throws IOException */ - @Test + @Test (timeout=300000) public void testForceSplitMultiFamily() throws Exception { int numVersions = HColumnDescriptor.DEFAULT_VERSIONS; @@ -1077,17 +1077,17 @@ * @throws IOException */ @SuppressWarnings("deprecation") - @Test (expected=IllegalArgumentException.class) + @Test (expected=IllegalArgumentException.class, timeout=300000) public void testEmptyHTableDescriptor() throws IOException { this.admin.createTable(new HTableDescriptor()); } - @Test (expected=IllegalArgumentException.class) + @Test (expected=IllegalArgumentException.class, timeout=300000) public void testInvalidHColumnDescriptor() throws IOException { new HColumnDescriptor("/cfamily/name"); } - @Test(timeout=300000) + @Test (timeout=300000) public void testEnableDisableAddColumnDeleteColumn() throws Exception { ZooKeeperWatcher zkw = HBaseTestingUtility.getZooKeeperWatcher(TEST_UTIL); TableName tableName = TableName.valueOf("testMasterAdmin"); @@ -1114,7 +1114,7 @@ this.admin.deleteTable(tableName); } - @Test + @Test (timeout=300000) public void testCreateBadTables() throws IOException { String msg = null; try { @@ -1172,7 +1172,7 @@ * Test for hadoop-1581 'HBASE: Unopenable tablename bug'. * @throws Exception */ - @Test + @Test (timeout=300000) public void testTableNameClash() throws Exception { String name = "testTableNameClash"; admin.createTable(new HTableDescriptor(TableName.valueOf(name + "SOMEUPPERCASE"))); @@ -1188,7 +1188,7 @@ * issue anymore * @throws Exception */ - @Test + @Test (timeout=300000) public void testCreateTableRPCTimeOut() throws Exception { String name = "testCreateTableRPCTimeOut"; int oldTimeout = TEST_UTIL.getConfiguration(). @@ -1212,7 +1212,7 @@ * Test read only tables * @throws Exception */ - @Test + @Test (timeout=300000) public void testReadOnlyTable() throws Exception { byte [] name = Bytes.toBytes("testReadOnlyTable"); HTable table = TEST_UTIL.createTable(name, HConstants.CATALOG_FAMILY); @@ -1229,7 +1229,7 @@ * start with same. HBASE-771 * @throws IOException */ - @Test + @Test (timeout=300000) public void testTableNames() throws IOException { byte[][] illegalNames = new byte[][] { Bytes.toBytes("-bad"), @@ -1258,7 +1258,7 @@ * For HADOOP-2579 * @throws IOException */ - @Test (expected=TableExistsException.class) + @Test (expected=TableExistsException.class, timeout=300000) public void testTableExistsExceptionWithATable() throws IOException { final byte [] name = Bytes.toBytes("testTableExistsExceptionWithATable"); TEST_UTIL.createTable(name, HConstants.CATALOG_FAMILY).close(); @@ -1269,7 +1269,7 @@ * Can't disable a table if the table isn't in enabled state * @throws IOException */ - @Test (expected=TableNotEnabledException.class) + @Test (expected=TableNotEnabledException.class, timeout=300000) public void testTableNotEnabledExceptionWithATable() throws IOException { final byte [] name = Bytes.toBytes( "testTableNotEnabledExceptionWithATable"); @@ -1282,7 +1282,7 @@ * Can't enable a table if the table isn't in disabled state * @throws IOException */ - @Test (expected=TableNotDisabledException.class) + @Test (expected=TableNotDisabledException.class, timeout=300000) public void testTableNotDisabledExceptionWithATable() throws IOException { final byte [] name = Bytes.toBytes( "testTableNotDisabledExceptionWithATable"); @@ -1298,13 +1298,13 @@ * For HADOOP-2579 * @throws IOException */ - @Test (expected=TableNotFoundException.class) + @Test (expected=TableNotFoundException.class, timeout=300000) public void testTableNotFoundExceptionWithoutAnyTables() throws IOException { new HTable(TEST_UTIL.getConfiguration(),"testTableNotFoundExceptionWithoutAnyTables"); } - @Test + @Test (timeout=300000) public void testShouldCloseTheRegionBasedOnTheEncodedRegionName() throws Exception { TableName TABLENAME = @@ -1332,7 +1332,7 @@ isInList); } - @Test + @Test (timeout=300000) public void testCloseRegionIfInvalidRegionNameIsPassed() throws Exception { byte[] TABLENAME = Bytes.toBytes("TestHBACloseRegion1"); createTableWithDefaultConf(TABLENAME); @@ -1358,7 +1358,7 @@ onlineRegions.contains(info)); } - @Test + @Test (timeout=300000) public void testCloseRegionThatFetchesTheHRIFromMeta() throws Exception { TableName TABLENAME = TableName.valueOf("TestHBACloseRegion2"); @@ -1389,7 +1389,7 @@ isInList); } - @Test + @Test (timeout=300000) public void testCloseRegionWhenServerNameIsNull() throws Exception { byte[] TABLENAME = Bytes.toBytes("TestHBACloseRegion3"); createTableWithDefaultConf(TABLENAME); @@ -1413,7 +1413,7 @@ } - @Test + @Test (timeout=300000) public void testCloseRegionWhenServerNameIsEmpty() throws Exception { byte[] TABLENAME = Bytes.toBytes("TestHBACloseRegionWhenServerNameIsEmpty"); createTableWithDefaultConf(TABLENAME); @@ -1436,7 +1436,7 @@ } } - @Test + @Test (timeout=300000) public void testCloseRegionWhenEncodedRegionNameIsNotGiven() throws Exception { byte[] TABLENAME = Bytes.toBytes("TestHBACloseRegion4"); createTableWithDefaultConf(TABLENAME); @@ -1492,7 +1492,7 @@ * For HBASE-2556 * @throws IOException */ - @Test + @Test (timeout=300000) public void testGetTableRegions() throws IOException { byte[] tableName = Bytes.toBytes("testGetTableRegions"); @@ -1516,7 +1516,7 @@ } - @Test + @Test (timeout=300000) public void testHLogRollWriting() throws Exception { setUpforLogRolling(); String className = this.getClass().getName(); @@ -1543,7 +1543,7 @@ assertTrue(("actual count: " + count), count <= 2); } - @Test + @Test (timeout=300000) public void testMoveToPreviouslyAssignedRS() throws IOException, InterruptedException { byte[] tableName = Bytes.toBytes("testMoveToPreviouslyAssignedRS"); MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster(); @@ -1641,7 +1641,7 @@ /** * HBASE-4417 checkHBaseAvailable() doesn't close zk connections */ - @Test + @Test (timeout=300000) public void testCheckHBaseAvailableClosesConnection() throws Exception { Configuration conf = TEST_UTIL.getConfiguration(); @@ -1655,7 +1655,7 @@ /** * Check that we have an exception if the cluster is not there. */ - @Test + @Test (timeout=300000) public void testCheckHBaseAvailableWithoutCluster() { Configuration conf = new Configuration(TEST_UTIL.getConfiguration()); @@ -1684,7 +1684,7 @@ " HBase was not available"); } - @Test + @Test (timeout=300000) public void testDisableCatalogTable() throws Exception { try { this.admin.disableTable(TableName.META_TABLE_NAME); @@ -1699,7 +1699,7 @@ TEST_UTIL.getHBaseAdmin().createTable(htd); } - @Test + @Test (timeout=300000) public void testGetRegion() throws Exception { final String name = "testGetRegion"; LOG.info("Started " + name); @@ -1720,4 +1720,4 @@ ct.stop(); } } -} +} \ No newline at end of file