diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java index 53e7224..651d499 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java @@ -91,8 +91,6 @@ public class TestZooKeeperTableArchiveClient { private static void setupConf(Configuration conf) { // only compact with 3 files conf.setInt("hbase.hstore.compaction.min", 3); - // drop the number of attempts for the hbase admin - conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 1); } @After @@ -125,7 +123,7 @@ public class TestZooKeeperTableArchiveClient { /** * Test turning on/off archiving */ - @Test + @Test (timeout=300000) public void testArchivingEnableDisable() throws Exception { // 1. turn on hfile backups LOG.debug("----Starting archiving"); @@ -148,7 +146,7 @@ public class TestZooKeeperTableArchiveClient { archivingClient.getArchivingEnabled(TABLE_NAME)); } - @Test + @Test (timeout=300000) public void testArchivingOnSingleTable() throws Exception { createArchiveDirectory(); FileSystem fs = UTIL.getTestFileSystem(); @@ -192,7 +190,7 @@ public class TestZooKeeperTableArchiveClient { * Test archiving/cleaning across multiple tables, where some are retained, and others aren't * @throws Exception on failure */ - @Test + @Test (timeout=300000) public void testMultipleTables() throws Exception { createArchiveDirectory(); String otherTable = "otherTable"; @@ -415,4 +413,4 @@ public class TestZooKeeperTableArchiveClient { // stop the cleaner stop.stop(""); } -} +} \ No newline at end of file diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java index 5e627b6..a6f48dd 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotCloneIndependence.java @@ -82,10 +82,7 @@ public class TestSnapshotCloneIndependence { conf.setInt("hbase.hstore.compactionThreshold", 10); // block writes if we get to 12 store files conf.setInt("hbase.hstore.blockingStoreFiles", 12); - // drop the number of attempts for the hbase admin conf.setInt("hbase.regionserver.msginterval", 100); - conf.setInt("hbase.client.pause", 250); - conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6); conf.setBoolean("hbase.master.enabletable.roundrobin", true); // Avoid potentially aggressive splitting which would cause snapshot to fail conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY, @@ -122,7 +119,7 @@ public class TestSnapshotCloneIndependence { * Verify that adding data to the cloned table will not affect the original, and vice-versa when * it is taken as an online snapshot. */ - @Test + @Test (timeout=300000) public void testOnlineSnapshotAppendIndependent() throws Exception { runTestSnapshotAppendIndependent(true); } @@ -131,7 +128,7 @@ public class TestSnapshotCloneIndependence { * Verify that adding data to the cloned table will not affect the original, and vice-versa when * it is taken as an offline snapshot. */ - @Test + @Test (timeout=300000) public void testOfflineSnapshotAppendIndependent() throws Exception { runTestSnapshotAppendIndependent(false); } @@ -140,7 +137,7 @@ public class TestSnapshotCloneIndependence { * Verify that adding metadata to the cloned table will not affect the original, and vice-versa * when it is taken as an online snapshot. */ - @Test + @Test (timeout=300000) public void testOnlineSnapshotMetadataChangesIndependent() throws Exception { runTestSnapshotMetadataChangesIndependent(true); } @@ -149,7 +146,7 @@ public class TestSnapshotCloneIndependence { * Verify that adding netadata to the cloned table will not affect the original, and vice-versa * when is taken as an online snapshot. */ - @Test + @Test (timeout=300000) public void testOfflineSnapshotMetadataChangesIndependent() throws Exception { runTestSnapshotMetadataChangesIndependent(false); } @@ -158,7 +155,7 @@ public class TestSnapshotCloneIndependence { * Verify that region operations, in this case splitting a region, are independent between the * cloned table and the original. */ - @Test + @Test (timeout=300000) public void testOfflineSnapshotRegionOperationsIndependent() throws Exception { runTestRegionOperationsIndependent(false); } @@ -167,7 +164,7 @@ public class TestSnapshotCloneIndependence { * Verify that region operations, in this case splitting a region, are independent between the * cloned table and the original. */ - @Test + @Test (timeout=300000) public void testOnlineSnapshotRegionOperationsIndependent() throws Exception { runTestRegionOperationsIndependent(true); } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java index 378fac8..ac48fd8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java @@ -24,7 +24,6 @@ import java.io.IOException; import java.util.HashSet; import java.util.List; import java.util.Set; -import java.util.regex.Pattern; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -85,8 +84,6 @@ public class TestSnapshotFromClient { conf.setInt("hbase.hstore.compactionThreshold", 10); // block writes if we get to 12 store files conf.setInt("hbase.hstore.blockingStoreFiles", 12); - // drop the number of attempts for the hbase admin - conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 1); // Enable snapshot conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true); conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY, @@ -123,7 +120,7 @@ public class TestSnapshotFromClient { * Test snapshotting not allowed .META. and -ROOT- * @throws Exception */ - @Test + @Test (timeout=300000) public void testMetaTablesSnapshot() throws Exception { HBaseAdmin admin = UTIL.getHBaseAdmin(); byte[] snapshotName = Bytes.toBytes("metaSnapshot"); @@ -148,7 +145,7 @@ public class TestSnapshotFromClient { * * @throws Exception */ - @Test + @Test (timeout=300000) public void testSnapshotDeletionWithRegex() throws Exception { HBaseAdmin admin = UTIL.getHBaseAdmin(); // make sure we don't fail on listing snapshots @@ -184,7 +181,7 @@ public class TestSnapshotFromClient { * Test snapshotting a table that is offline * @throws Exception */ - @Test + @Test (timeout=300000) public void testOfflineTableSnapshot() throws Exception { HBaseAdmin admin = UTIL.getHBaseAdmin(); // make sure we don't fail on listing snapshots @@ -238,7 +235,7 @@ public class TestSnapshotFromClient { SnapshotTestingUtils.assertNoSnapshots(admin); } - @Test + @Test (timeout=300000) public void testSnapshotFailsOnNonExistantTable() throws Exception { HBaseAdmin admin = UTIL.getHBaseAdmin(); // make sure we don't fail on listing snapshots @@ -266,4 +263,4 @@ public class TestSnapshotFromClient { LOG.info("Correctly failed to snapshot a non-existant table:" + e.getMessage()); } } -} +} \ No newline at end of file diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java index 5a989e7..13f57dc 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotMetadata.java @@ -110,10 +110,7 @@ public class TestSnapshotMetadata { conf.setInt("hbase.hstore.compactionThreshold", 10); // block writes if we get to 12 store files conf.setInt("hbase.hstore.blockingStoreFiles", 12); - // drop the number of attempts for the hbase admin conf.setInt("hbase.regionserver.msginterval", 100); - conf.setInt("hbase.client.pause", 250); - conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 6); conf.setBoolean("hbase.master.enabletable.roundrobin", true); // Avoid potentially aggressive splitting which would cause snapshot to fail conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY, @@ -175,7 +172,7 @@ public class TestSnapshotMetadata { /** * Verify that the describe for a cloned table matches the describe from the original. */ - @Test + @Test (timeout=300000) public void testDescribeMatchesAfterClone() throws Exception { // Clone the original table final String clonedTableNameAsString = "clone" + originalTableNameAsString; @@ -218,7 +215,7 @@ public class TestSnapshotMetadata { /** * Verify that the describe for a restored table matches the describe for one the original. */ - @Test + @Test (timeout=300000) public void testDescribeMatchesAfterRestore() throws Exception { runRestoreWithAdditionalMetadata(false); } @@ -227,7 +224,7 @@ public class TestSnapshotMetadata { * Verify that if metadata changed after a snapshot was taken, that the old metadata replaces the * new metadata during a restore */ - @Test + @Test (timeout=300000) public void testDescribeMatchesAfterMetadataChangeAndRestore() throws Exception { runRestoreWithAdditionalMetadata(true); } @@ -237,7 +234,7 @@ public class TestSnapshotMetadata { * the restored table's original metadata * @throws Exception */ - @Test + @Test (timeout=300000) public void testDescribeOnEmptyTableMatchesAfterMetadataChangeAndRestore() throws Exception { runRestoreWithAdditionalMetadata(true, false); } diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java index a4f5d4c..4771318 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/snapshot/TestFlushSnapshotFromClient.java @@ -113,8 +113,6 @@ public class TestFlushSnapshotFromClient { conf.setInt("hbase.hstore.compactionThreshold", 10); // block writes if we get to 12 store files conf.setInt("hbase.hstore.blockingStoreFiles", 12); - // drop the number of attempts for the hbase admin - conf.setInt(HConstants.HBASE_CLIENT_RETRIES_NUMBER, 3); // Enable snapshot conf.setBoolean(SnapshotManager.HBASE_SNAPSHOT_ENABLED, true); conf.set(HConstants.HBASE_REGION_SPLIT_POLICY_KEY, @@ -155,7 +153,7 @@ public class TestFlushSnapshotFromClient { * Test simple flush snapshotting a table that is online * @throws Exception */ - @Test + @Test (timeout=300000) public void testFlushTableSnapshot() throws Exception { HBaseAdmin admin = UTIL.getHBaseAdmin(); // make sure we don't fail on listing snapshots @@ -199,7 +197,7 @@ public class TestFlushSnapshotFromClient { admin, fs, false, new Path(rootDir, HConstants.HREGION_LOGDIR_NAME), snapshotServers); } - @Test + @Test (timeout=300000) public void testSnapshotFailsOnNonExistantTable() throws Exception { HBaseAdmin admin = UTIL.getHBaseAdmin(); // make sure we don't fail on listing snapshots @@ -228,7 +226,7 @@ public class TestFlushSnapshotFromClient { } } - @Test(timeout = 60000) + @Test(timeout = 300000) public void testAsyncFlushSnapshot() throws Exception { HBaseAdmin admin = UTIL.getHBaseAdmin(); SnapshotDescription snapshot = SnapshotDescription.newBuilder().setName("asyncSnapshot") @@ -247,7 +245,7 @@ public class TestFlushSnapshotFromClient { SnapshotTestingUtils.assertOneSnapshotThatMatches(admin, snapshot); } - @Test + @Test (timeout=300000) public void testSnapshotStateAfterMerge() throws Exception { int numRows = DEFAULT_NUM_ROWS; HBaseAdmin admin = UTIL.getHBaseAdmin(); @@ -300,7 +298,7 @@ public class TestFlushSnapshotFromClient { UTIL.deleteTable(cloneBeforeMergeName); } - @Test + @Test (timeout=300000) public void testTakeSnapshotAfterMerge() throws Exception { int numRows = DEFAULT_NUM_ROWS; HBaseAdmin admin = UTIL.getHBaseAdmin(); @@ -348,7 +346,7 @@ public class TestFlushSnapshotFromClient { /** * Basic end-to-end test of simple-flush-based snapshots */ - @Test + @Test (timeout=300000) public void testFlushCreateListDestroy() throws Exception { LOG.debug("------- Starting Snapshot test -------------"); HBaseAdmin admin = UTIL.getHBaseAdmin(); @@ -406,7 +404,7 @@ public class TestFlushSnapshotFromClient { * same table currently running and that concurrent snapshots on different tables can both * succeed concurretly. */ - @Test(timeout=60000) + @Test(timeout=300000) public void testConcurrentSnapshottingAttempts() throws IOException, InterruptedException { final String STRING_TABLE2_NAME = STRING_TABLE_NAME + "2"; final byte[] TABLE2_NAME = Bytes.toBytes(STRING_TABLE2_NAME);