From 3c848de7841e2141762a2a9db8815222d06efc66 Mon Sep 17 00:00:00 2001 From: Guanghao Date: Wed, 29 May 2019 14:09:16 +0800 Subject: [PATCH] HBASE-22488 Cleanup the explicit timeout value for test methods --- .../apache/hadoop/hbase/coprocessor/TestMetaTableMetrics.java | 2 +- .../hbase/master/TestMasterHandlerFullWhenTransitRegion.java | 2 +- .../org/apache/hadoop/hbase/master/TestMasterNoCluster.java | 4 ++-- .../apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java | 2 +- .../java/org/apache/hadoop/hbase/quotas/TestQuotaState.java | 2 +- .../org/apache/hadoop/hbase/regionserver/TestWALLockup.java | 2 +- .../regionserver/throttle/TestStoreHotnessProtector.java | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMetaTableMetrics.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMetaTableMetrics.java index 82ce709bd36..16db86db89d 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMetaTableMetrics.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/coprocessor/TestMetaTableMetrics.java @@ -232,7 +232,7 @@ public class TestMetaTableMetrics { assertEquals(5L, putWithClientMetricsCount); } - @Test(timeout = 30000) + @Test public void testConcurrentAccess() { try { tablename = Bytes.toBytes("hbase:meta"); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterHandlerFullWhenTransitRegion.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterHandlerFullWhenTransitRegion.java index 049c560841c..ea5d3d17ad4 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterHandlerFullWhenTransitRegion.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterHandlerFullWhenTransitRegion.java @@ -63,7 +63,7 @@ public class TestMasterHandlerFullWhenTransitRegion { UTIL.createTable(TableName.valueOf(TABLENAME), "fa"); } - @Test(timeout = 30000) + @Test public void test() throws Exception { RegionInfo regionInfo = UTIL.getAdmin().getRegions(TableName.valueOf(TABLENAME)).get(0); //See HBASE-21754 diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java index 3aa03965d05..15b14b4f7b9 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/TestMasterNoCluster.java @@ -309,7 +309,7 @@ public class TestMasterNoCluster { } } - @Test(timeout = 60000) + @Test public void testMasterInitWithSameClientServerZKQuorum() throws Exception { Configuration conf = new Configuration(TESTUTIL.getConfiguration()); conf.set(HConstants.CLIENT_ZOOKEEPER_QUORUM, HConstants.LOCALHOST); @@ -320,7 +320,7 @@ public class TestMasterNoCluster { master.join(); } - @Test(timeout = 60000) + @Test public void testMasterInitWithObserverModeClientZKQuorum() throws Exception { Configuration conf = new Configuration(TESTUTIL.getConfiguration()); Assert.assertFalse(Boolean.getBoolean(HConstants.CLIENT_ZOOKEEPER_OBSERVER_MODE)); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java index 9a6ca79cd63..696b4504a0c 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/master/cleaner/TestLogsCleaner.java @@ -238,7 +238,7 @@ public class TestLogsCleaner { * When zk is working both files should be returned * @throws Exception */ - @Test(timeout=10000) + @Test public void testZooKeeperNormal() throws Exception { Configuration conf = TEST_UTIL.getConfiguration(); ReplicationLogCleaner cleaner = new ReplicationLogCleaner(); diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaState.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaState.java index 0cbc445889b..8fa6c224e47 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaState.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaState.java @@ -203,7 +203,7 @@ public class TestQuotaState { assertNoopLimiter(quotaInfo.getTableLimiter(UNKNOWN_TABLE_NAME)); } - @Test(timeout = 60000) + @Test public void testTableThrottleWithBatch() { final TableName TABLE_A = TableName.valueOf("TableA"); final int TABLE_A_THROTTLE_1 = 3; diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java index bbea064a646..dca2a72539f 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestWALLockup.java @@ -314,7 +314,7 @@ public class TestWALLockup { * If below is broken, we will see this test timeout because RingBufferEventHandler was stuck in * attainSafePoint. Everyone will wait for sync to finish forever. See HBASE-14317. */ - @Test (timeout=30000) + @Test public void testRingBufferEventHandlerStuckWhenSyncFailed() throws IOException, InterruptedException { diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestStoreHotnessProtector.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestStoreHotnessProtector.java index 6d4193474b2..a73d36631d4 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestStoreHotnessProtector.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/throttle/TestStoreHotnessProtector.java @@ -52,7 +52,7 @@ public class TestStoreHotnessProtector { @ClassRule public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestStoreHotnessProtector.class); - @Test(timeout = 60000) + @Test public void testPreparePutCounter() throws Exception { ExecutorService executorService = Executors.newFixedThreadPool(10);