HBASE-19951 Cleanup the explicit timeout value for test method
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/8f1e01b6 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/8f1e01b6 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/8f1e01b6 Branch: refs/heads/HBASE-19397-branch-2 Commit: 8f1e01b6e54169c58900eeddb9de6ca6487f6a22 Parents: 7d44989 Author: Michael Stack <st...@apache.org> Authored: Wed Feb 7 11:55:18 2018 -0800 Committer: Michael Stack <st...@apache.org> Committed: Wed Feb 7 16:39:54 2018 -0800 ---------------------------------------------------------------------- .../hadoop/hbase/client/TestAsyncProcess.java | 4 +- .../hadoop/hbase/client/TestClientScanner.java | 2 +- .../hbase/client/TestProcedureFuture.java | 8 +- .../hbase/client/TestSnapshotFromAdmin.java | 2 +- .../apache/hadoop/hbase/TestChoreService.java | 32 +++--- .../io/crypto/TestKeyStoreKeyProvider.java | 4 +- .../apache/hadoop/hbase/util/TestThreads.java | 2 +- .../hbase/http/TestHttpServerLifecycle.java | 12 +- .../hadoop/hbase/http/log/TestLogLevel.java | 2 +- .../hbase/ipc/IntegrationTestRpcClient.java | 6 +- .../hadoop/hbase/mapreduce/TestCellCounter.java | 14 +-- .../hbase/mapreduce/TestHRegionPartitioner.java | 2 +- .../hbase/procedure2/TestProcedureEvents.java | 6 +- .../procedure2/TestProcedureExecution.java | 12 +- .../hbase/procedure2/TestProcedureExecutor.java | 2 +- .../hbase/procedure2/TestProcedureNonce.java | 8 +- .../hbase/procedure2/TestProcedureRecovery.java | 12 +- .../procedure2/TestProcedureReplayOrder.java | 4 +- .../TestProcedureSchedulerConcurrency.java | 4 +- .../procedure2/TestProcedureSuspended.java | 4 +- .../store/wal/TestWALProcedureStore.java | 4 +- .../hadoop/hbase/TestHBaseTestingUtility.java | 2 +- .../hadoop/hbase/TestJMXConnectorServer.java | 6 +- .../org/apache/hadoop/hbase/TestNamespace.java | 2 +- .../hadoop/hbase/TestNodeHealthCheckChore.java | 8 +- .../hadoop/hbase/TestRegionRebalancing.java | 2 +- .../hbase/TestStochasticBalancerJmxMetrics.java | 4 +- .../TestZooKeeperTableArchiveClient.java | 6 +- .../apache/hadoop/hbase/client/TestAdmin1.java | 50 ++++----- .../apache/hadoop/hbase/client/TestAdmin2.java | 50 ++++----- .../client/TestAsyncDecommissionAdminApi.java | 2 +- .../client/TestAsyncNamespaceAdminApi.java | 6 +- .../hadoop/hbase/client/TestClientPushback.java | 2 +- .../hadoop/hbase/client/TestEnableTable.java | 4 +- .../hbase/client/TestFromClientSide3.java | 10 +- .../hadoop/hbase/client/TestMultiParallel.java | 22 ++-- .../hbase/client/TestReplicaWithCluster.java | 8 +- .../hadoop/hbase/client/TestScannerTimeout.java | 6 +- .../hbase/client/TestSnapshotFromClient.java | 18 +-- .../hbase/client/TestSnapshotMetadata.java | 8 +- .../TestReplicationAdminWithClusters.java | 22 ++-- .../hadoop/hbase/constraint/TestConstraint.java | 2 +- ...TestMasterCoprocessorExceptionWithAbort.java | 2 +- ...estMasterCoprocessorExceptionWithRemove.java | 2 +- .../hbase/coprocessor/TestMasterObserver.java | 20 ++-- .../TestRegionObserverInterface.java | 2 +- ...gionServerCoprocessorExceptionWithAbort.java | 4 +- ...ionServerCoprocessorExceptionWithRemove.java | 2 +- .../TestTimeoutExceptionInjector.java | 6 +- .../hbase/io/encoding/TestChangingEncoding.java | 4 +- .../encoding/TestLoadAndSwitchEncodeOnDisk.java | 2 +- .../hadoop/hbase/io/hfile/TestCacheConfig.java | 2 +- .../hbase/io/hfile/TestHFileBlockIndex.java | 4 +- .../hbase/io/hfile/TestHFileEncryption.java | 6 +- .../hadoop/hbase/io/hfile/TestPrefetch.java | 2 +- .../io/hfile/bucket/TestBucketWriterThread.java | 6 +- .../hadoop/hbase/ipc/TestNettyRpcServer.java | 2 +- .../hadoop/hbase/master/AbstractTestDLS.java | 12 +- .../hbase/master/TestAssignmentListener.java | 4 +- .../TestCatalogJanitorInMemoryStates.java | 2 +- .../hadoop/hbase/master/TestDeadServer.java | 2 +- .../master/TestMasterBalanceThrottling.java | 4 +- .../TestMasterFailoverBalancerPersistence.java | 2 +- .../hadoop/hbase/master/TestMasterMetrics.java | 2 +- .../hbase/master/TestMasterMetricsWrapper.java | 2 +- .../hadoop/hbase/master/TestMasterShutdown.java | 4 +- .../hbase/master/TestMasterTransitions.java | 9 +- .../hbase/master/TestMetaShutdownHandler.java | 2 +- .../hadoop/hbase/master/TestRestartCluster.java | 4 +- .../hadoop/hbase/master/TestRollingRestart.java | 2 +- .../hbase/master/TestSplitLogManager.java | 26 ++--- .../hbase/master/TestTableStateManager.java | 2 +- .../assignment/TestAssignmentOnRSCrash.java | 12 +- .../assignment/TestRogueRSAssignment.java | 2 +- .../TestSplitTableRegionProcedure.java | 2 +- .../master/balancer/TestBaseLoadBalancer.java | 14 +-- .../balancer/TestDefaultLoadBalancer.java | 4 +- .../hbase/master/cleaner/TestHFileCleaner.java | 4 +- .../hbase/master/cleaner/TestLogsCleaner.java | 2 +- .../cleaner/TestReplicationHFileCleaner.java | 2 +- .../master/cleaner/TestSnapshotFromMaster.java | 8 +- .../hbase/master/locking/TestLockProcedure.java | 8 +- .../TestSimpleRegionNormalizerOnCluster.java | 4 +- .../procedure/TestCloneSnapshotProcedure.java | 8 +- .../procedure/TestCreateNamespaceProcedure.java | 14 +-- .../procedure/TestDeleteNamespaceProcedure.java | 12 +- .../procedure/TestDeleteTableProcedure.java | 12 +- .../procedure/TestDisableTableProcedure.java | 6 +- .../procedure/TestEnableTableProcedure.java | 8 +- .../TestFastFailOnProcedureNotRegistered.java | 2 +- .../procedure/TestMasterProcedureEvents.java | 4 +- ...TestMasterProcedureSchedulerConcurrency.java | 4 +- .../procedure/TestModifyNamespaceProcedure.java | 12 +- .../procedure/TestModifyTableProcedure.java | 14 +-- .../master/procedure/TestProcedureAdmin.java | 10 +- .../procedure/TestRestoreSnapshotProcedure.java | 8 +- .../procedure/TestSafemodeBringsDownMaster.java | 2 +- .../procedure/TestServerCrashProcedure.java | 6 +- .../procedure/TestWALProcedureStoreOnHDFS.java | 6 +- .../master/snapshot/TestSnapshotFileCache.java | 2 +- .../hbase/mob/compactions/TestMobCompactor.java | 10 +- .../hadoop/hbase/procedure/TestProcedure.java | 8 +- .../procedure/TestProcedureCoordinator.java | 12 +- .../hbase/procedure/TestProcedureMember.java | 14 +-- .../procedure/TestZKProcedureControllers.java | 8 +- .../hadoop/hbase/quotas/TestQuotaState.java | 10 +- .../hadoop/hbase/quotas/TestQuotaThrottle.java | 24 ++-- .../hadoop/hbase/quotas/TestSpaceQuotas.java | 6 +- .../regionserver/TestCompactSplitThread.java | 2 +- .../hbase/regionserver/TestCompactionState.java | 8 +- .../hbase/regionserver/TestFSErrorsExposed.java | 2 +- .../regionserver/TestFailedAppendAndSync.java | 2 +- .../regionserver/TestHRegionOnCluster.java | 2 +- .../regionserver/TestHRegionReplayEvents.java | 2 +- .../hadoop/hbase/regionserver/TestHStore.java | 2 +- .../hbase/regionserver/TestMobStoreScanner.java | 2 +- .../regionserver/TestPerColumnFamilyFlush.java | 10 +- .../hbase/regionserver/TestRecoveredEdits.java | 2 +- .../hbase/regionserver/TestRegionOpen.java | 4 +- .../regionserver/TestRegionReplicaFailover.java | 12 +- .../hbase/regionserver/TestRegionReplicas.java | 14 +-- .../TestRegionReplicasAreDistributed.java | 2 +- .../TestRegionReplicasWithModifyTable.java | 12 +- .../regionserver/TestRegionServerHostname.java | 8 +- .../regionserver/TestRegionServerNoMaster.java | 6 +- .../TestScannerRetriableFailure.java | 2 +- .../hbase/regionserver/TestSplitLogWorker.java | 14 +-- .../TestWalAndCompactingMemStoreFlush.java | 10 +- .../wal/AbstractTestLogRollPeriod.java | 2 +- .../regionserver/wal/TestAsyncLogRolling.java | 2 +- .../hbase/regionserver/wal/TestFSHLog.java | 2 +- .../regionserver/wal/TestLogRollAbort.java | 2 +- .../replication/TestMasterReplication.java | 14 +-- .../replication/TestMultiSlaveReplication.java | 2 +- .../replication/TestPerTableCFReplication.java | 2 +- ...estReplicationChangingPeerRegionservers.java | 2 +- .../TestReplicationDisableInactivePeer.java | 2 +- .../TestReplicationDroppedTables.java | 8 +- .../replication/TestReplicationEndpoint.java | 12 +- .../TestReplicationKillMasterRS.java | 2 +- .../replication/TestReplicationKillSlaveRS.java | 2 +- .../replication/TestReplicationStatus.java | 2 +- .../replication/TestReplicationSyncUpTool.java | 2 +- .../TestReplicationTrackerZKImpl.java | 8 +- .../replication/TestReplicationWithTags.java | 2 +- .../TestRegionReplicaReplicationEndpoint.java | 16 +-- ...egionReplicaReplicationEndpointNoMaster.java | 6 +- .../regionserver/TestReplicationThrottler.java | 2 +- .../access/TestAccessControlFilter.java | 2 +- .../security/access/TestAccessController.java | 112 +++++++++---------- .../security/access/TestAccessController2.java | 12 +- .../hbase/security/access/TestCellACLs.java | 4 +- .../TestVisibilityLabelsWithDeletes.java | 6 +- .../TestWithDisabledAuthorization.java | 4 +- .../hbase/snapshot/TestRegionSnapshotTask.java | 2 +- .../snapshot/TestSnapshotClientRetries.java | 4 +- .../hbase/tool/TestLoadIncrementalHFiles.java | 36 +++--- .../TestLoadIncrementalHFilesSplitRecovery.java | 12 +- ...ecureLoadIncrementalHFilesSplitRecovery.java | 2 +- .../util/TestBoundedPriorityBlockingQueue.java | 2 +- .../hadoop/hbase/util/TestHBaseFsckMOB.java | 2 +- .../hadoop/hbase/util/TestIdReadWriteLock.java | 2 +- .../hbase/util/TestMiniClusterLoadParallel.java | 2 +- .../util/TestMiniClusterLoadSequential.java | 2 +- .../hadoop/hbase/util/TestRegionMover.java | 2 +- .../apache/hadoop/hbase/wal/TestWALFactory.java | 2 +- .../apache/hadoop/hbase/wal/TestWALSplit.java | 66 +++++------ .../TestWALSplitBoundedLogWriterCreation.java | 2 +- .../hbase/zookeeper/TestZooKeeperACL.java | 10 +- .../hadoop/hbase/thrift/TestCallQueue.java | 4 +- .../hbase/thrift/TestThriftHttpServer.java | 4 +- .../hbase/thrift/TestThriftServerCmdLine.java | 2 +- .../hbase/zookeeper/TestInstancePending.java | 2 +- .../hadoop/hbase/zookeeper/TestZKMulti.java | 20 ++-- 174 files changed, 674 insertions(+), 671 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java index 3a74682..fc405df 100644 --- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java +++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestAsyncProcess.java @@ -586,7 +586,7 @@ public class TestAsyncProcess { doSubmitRequest(maxHeapSizePerRequest, putsHeapSize); } - @Test(timeout=300000) + @Test public void testSubmitRandomSizeRequest() throws Exception { Random rn = new Random(); final long limit = 10 * 1024 * 1024; @@ -611,7 +611,7 @@ public class TestAsyncProcess { doSubmitRequest(maxHeapSizePerRequest, putsHeapSize); } - @Test(timeout=120000) + @Test public void testSubmitLargeRequest() throws Exception { long maxHeapSizePerRequest = 2 * 1024 * 1024; long putsHeapSize = maxHeapSizePerRequest * 2; http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java index cfe9e07..48ca751 100644 --- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java +++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java @@ -462,7 +462,7 @@ public class TestClientScanner { * Tests the case where all replicas of a region throw an exception. It should not cause a hang * but the exception should propagate to the client */ - @Test (timeout = 30000) + @Test public void testExceptionsFromReplicasArePropagated() throws IOException { scan.setConsistency(Consistency.TIMELINE); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestProcedureFuture.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestProcedureFuture.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestProcedureFuture.java index 44bd6e8..01740e9 100644 --- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestProcedureFuture.java +++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestProcedureFuture.java @@ -105,7 +105,7 @@ public class TestProcedureFuture { * we are skipping the waitOperationResult() call, * since we are getting the procedure result. */ - @Test(timeout=60000) + @Test public void testWithProcId() throws Exception { HBaseAdmin admin = Mockito.mock(HBaseAdmin.class); TestFuture f = new TestFuture(admin, 100L); @@ -120,7 +120,7 @@ public class TestProcedureFuture { /** * Verify that the spin loop for the procedure running works. */ - @Test(timeout=60000) + @Test public void testWithProcIdAndSpinning() throws Exception { final AtomicInteger spinCount = new AtomicInteger(0); HBaseAdmin admin = Mockito.mock(HBaseAdmin.class); @@ -147,7 +147,7 @@ public class TestProcedureFuture { * When a master return a result without procId, * we are skipping the getProcedureResult() call. */ - @Test(timeout=60000) + @Test public void testWithoutProcId() throws Exception { HBaseAdmin admin = Mockito.mock(HBaseAdmin.class); TestFuture f = new TestFuture(admin, null); @@ -167,7 +167,7 @@ public class TestProcedureFuture { * This happens when the operation calls happens on a "new master" but while we are waiting * the operation to be completed, we failover on an "old master". */ - @Test(timeout=60000) + @Test public void testOnServerWithNoProcedureSupport() throws Exception { HBaseAdmin admin = Mockito.mock(HBaseAdmin.class); TestFuture f = new TestFuture(admin, 100L) { http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromAdmin.java ---------------------------------------------------------------------- diff --git a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromAdmin.java b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromAdmin.java index a353a40..387e9dd 100644 --- a/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromAdmin.java +++ b/hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromAdmin.java @@ -64,7 +64,7 @@ public class TestSnapshotFromAdmin { * passed from the server ensures the correct overall waiting for the snapshot to finish. * @throws Exception */ - @Test(timeout = 60000) + @Test public void testBackoffLogic() throws Exception { final int pauseTime = 100; final int maxWaitTime = http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java ---------------------------------------------------------------------- diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java index dad1ce7..ce838fa 100644 --- a/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java +++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/TestChoreService.java @@ -243,7 +243,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testInitialChorePrecedence() throws InterruptedException { ChoreService service = new ChoreService("testInitialChorePrecedence"); @@ -272,7 +272,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testCancelChore() throws InterruptedException { final int period = 100; ScheduledChore chore1 = new DoNothingChore("chore1", period); @@ -289,7 +289,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testScheduledChoreConstruction() { final String NAME = "chore"; final int PERIOD = 100; @@ -322,7 +322,7 @@ public class TestChoreService { invalidDelayChore.getInitialDelay()); } - @Test (timeout=20000) + @Test public void testChoreServiceConstruction() throws InterruptedException { final int corePoolSize = 10; final int defaultCorePoolSize = ChoreService.MIN_CORE_POOL_SIZE; @@ -350,7 +350,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testFrequencyOfChores() throws InterruptedException { final int period = 100; // Small delta that acts as time buffer (allowing chores to complete if running slowly) @@ -377,7 +377,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testForceTrigger() throws InterruptedException { final int period = 100; final int delta = 10; @@ -413,7 +413,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testCorePoolIncrease() throws InterruptedException { final int initialCorePoolSize = 3; ChoreService service = new ChoreService("testCorePoolIncrease", initialCorePoolSize, false); @@ -453,7 +453,7 @@ public class TestChoreService { } } - @Test(timeout = 30000) + @Test public void testCorePoolDecrease() throws InterruptedException { final int initialCorePoolSize = 3; ChoreService service = new ChoreService("testCorePoolDecrease", initialCorePoolSize, false); @@ -522,7 +522,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testNumberOfRunningChores() throws InterruptedException { ChoreService service = new ChoreService("testNumberOfRunningChores"); @@ -563,7 +563,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testNumberOfChoresMissingStartTime() throws InterruptedException { ChoreService service = new ChoreService("testNumberOfChoresMissingStartTime"); @@ -611,7 +611,7 @@ public class TestChoreService { * been scheduled with the service. For example, if 4 ScheduledChores are scheduled with a * ChoreService, the number of threads in the ChoreService's core pool should never exceed 4 */ - @Test (timeout=20000) + @Test public void testMaximumChoreServiceThreads() throws InterruptedException { ChoreService service = new ChoreService("testMaximumChoreServiceThreads"); @@ -658,7 +658,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testChangingChoreServices() throws InterruptedException { final int period = 100; final int sleepTime = 10; @@ -697,7 +697,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testStopperForScheduledChores() throws InterruptedException { ChoreService service = new ChoreService("testStopperForScheduledChores"); Stoppable stopperForGroup1 = new SampleStopper(); @@ -752,7 +752,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testShutdownCancelsScheduledChores() throws InterruptedException { final int period = 100; ChoreService service = new ChoreService("testShutdownCancelsScheduledChores"); @@ -776,7 +776,7 @@ public class TestChoreService { assertFalse(successChore3.isScheduled()); } - @Test (timeout=20000) + @Test public void testShutdownWorksWhileChoresAreExecuting() throws InterruptedException { final int period = 100; final int sleep = 5 * period; @@ -804,7 +804,7 @@ public class TestChoreService { } } - @Test (timeout=20000) + @Test public void testShutdownRejectsNewSchedules() throws InterruptedException { final int period = 100; ChoreService service = new ChoreService("testShutdownRejectsNewSchedules"); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java ---------------------------------------------------------------------- diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java index e094a1d..0b22caa 100644 --- a/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java +++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/io/crypto/TestKeyStoreKeyProvider.java @@ -88,7 +88,7 @@ public class TestKeyStoreKeyProvider { } } - @Test(timeout=30000) + @Test public void testKeyStoreKeyProviderWithPassword() throws Exception { KeyProvider provider = new KeyStoreKeyProvider(); provider.init("jceks://" + storeFile.toURI().getPath() + "?password=" + PASSWORD); @@ -101,7 +101,7 @@ public class TestKeyStoreKeyProvider { } } - @Test(timeout=30000) + @Test public void testKeyStoreKeyProviderWithPasswordFile() throws Exception { KeyProvider provider = new KeyStoreKeyProvider(); provider.init("jceks://" + storeFile.toURI().getPath() + "?passwordFile=" + http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestThreads.java ---------------------------------------------------------------------- diff --git a/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestThreads.java b/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestThreads.java index 48b66fa..4f6da4e 100644 --- a/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestThreads.java +++ b/hbase-common/src/test/java/org/apache/hadoop/hbase/util/TestThreads.java @@ -43,7 +43,7 @@ public class TestThreads { private final AtomicBoolean wasInterrupted = new AtomicBoolean(false); - @Test(timeout=60000) + @Test public void testSleepWithoutInterrupt() throws InterruptedException { Thread sleeper = new Thread(new Runnable() { @Override http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServerLifecycle.java ---------------------------------------------------------------------- diff --git a/hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServerLifecycle.java b/hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServerLifecycle.java index 9825478..ce0d6d6 100644 --- a/hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServerLifecycle.java +++ b/hbase-http/src/test/java/org/apache/hadoop/hbase/http/TestHttpServerLifecycle.java @@ -52,13 +52,13 @@ public class TestHttpServerLifecycle extends HttpServerFunctionalTest { * * @throws Throwable on failure */ - @Ignore ("Hangs on occasion; see HBASE-14430") @Test(timeout=60000) + @Ignore ("Hangs on occasion; see HBASE-14430") @Test public void testCreatedServerIsNotAlive() throws Throwable { HttpServer server = createTestServer(); assertNotLive(server); } - @Ignore ("Hangs on occasion; see HBASE-14430") @Test(timeout=60000) + @Ignore ("Hangs on occasion; see HBASE-14430") @Test public void testStopUnstartedServer() throws Throwable { HttpServer server = createTestServer(); stop(server); @@ -69,7 +69,7 @@ public class TestHttpServerLifecycle extends HttpServerFunctionalTest { * * @throws Throwable on failure */ - @Ignore ("Hangs on occasion; see HBASE-14430") @Test(timeout=60000) + @Ignore ("Hangs on occasion; see HBASE-14430") @Test public void testStartedServerIsAlive() throws Throwable { HttpServer server = null; server = createTestServer(); @@ -95,7 +95,7 @@ public class TestHttpServerLifecycle extends HttpServerFunctionalTest { * * @throws Throwable on failure */ - @Ignore ("Hangs on occasion; see HBASE-14430") @Test(timeout=60000) + @Ignore ("Hangs on occasion; see HBASE-14430") @Test public void testStoppedServerIsNotAlive() throws Throwable { HttpServer server = createAndStartTestServer(); assertAlive(server); @@ -108,7 +108,7 @@ public class TestHttpServerLifecycle extends HttpServerFunctionalTest { * * @throws Throwable on failure */ - @Ignore ("Hangs on occasion; see HBASE-14430") @Test(timeout=60000) + @Ignore ("Hangs on occasion; see HBASE-14430") @Test public void testStoppingTwiceServerIsAllowed() throws Throwable { HttpServer server = createAndStartTestServer(); assertAlive(server); @@ -124,7 +124,7 @@ public class TestHttpServerLifecycle extends HttpServerFunctionalTest { * @throws Throwable * on failure */ - @Ignore ("Hangs on occasion; see HBASE-14430") @Test(timeout=60000) + @Ignore ("Hangs on occasion; see HBASE-14430") @Test public void testWepAppContextAfterServerStop() throws Throwable { HttpServer server = null; String key = "test.attribute.key"; http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-http/src/test/java/org/apache/hadoop/hbase/http/log/TestLogLevel.java ---------------------------------------------------------------------- diff --git a/hbase-http/src/test/java/org/apache/hadoop/hbase/http/log/TestLogLevel.java b/hbase-http/src/test/java/org/apache/hadoop/hbase/http/log/TestLogLevel.java index e552ce2..9da4819 100644 --- a/hbase-http/src/test/java/org/apache/hadoop/hbase/http/log/TestLogLevel.java +++ b/hbase-http/src/test/java/org/apache/hadoop/hbase/http/log/TestLogLevel.java @@ -47,7 +47,7 @@ public class TestLogLevel { static final PrintStream out = System.out; - @Test (timeout=60000) + @Test @SuppressWarnings("deprecation") public void testDynamicLogLevel() throws Exception { String logName = TestLogLevel.class.getName(); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java ---------------------------------------------------------------------- diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java index 4dde8b4..2dd1633 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/ipc/IntegrationTestRpcClient.java @@ -293,7 +293,7 @@ public class IntegrationTestRpcClient { Test that not started connections are successfully removed from connection pool when rpc client is closing. */ - @Test (timeout = 30000) + @Test public void testRpcWithWriteThread() throws IOException, InterruptedException { LOG.info("Starting test"); Cluster cluster = new Cluster(1, 1); @@ -312,7 +312,7 @@ public class IntegrationTestRpcClient { } - @Test (timeout = 1800000) + @Test public void testRpcWithChaosMonkeyWithSyncClient() throws Throwable { for (int i = 0; i < numIterations; i++) { TimeoutThread.runWithTimeout(new Callable<Void>() { @@ -333,7 +333,7 @@ public class IntegrationTestRpcClient { } } - @Test (timeout = 900000) + @Test @Ignore // TODO: test fails with async client public void testRpcWithChaosMonkeyWithAsyncClient() throws Throwable { for (int i = 0; i < numIterations; i++) { http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java ---------------------------------------------------------------------- diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java index 0fb4f76..b15116a 100644 --- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java +++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestCellCounter.java @@ -86,7 +86,7 @@ public class TestCellCounter { * Test CellCounter all data should print to output * */ - @Test (timeout=300000) + @Test public void testCellCounter() throws Exception { final TableName sourceTable = TableName.valueOf(name.getMethodName()); byte[][] families = { FAMILY_A, FAMILY_B }; @@ -124,7 +124,7 @@ public class TestCellCounter { /** * Test CellCounter all data should print to output */ - @Test(timeout = 300000) + @Test public void testCellCounterPrefix() throws Exception { final TableName sourceTable = TableName.valueOf(name.getMethodName()); byte[][] families = { FAMILY_A, FAMILY_B }; @@ -162,7 +162,7 @@ public class TestCellCounter { /** * Test CellCounter with time range all data should print to output */ - @Test (timeout=300000) + @Test public void testCellCounterStartTimeRange() throws Exception { final TableName sourceTable = TableName.valueOf(name.getMethodName()); byte[][] families = { FAMILY_A, FAMILY_B }; @@ -203,7 +203,7 @@ public class TestCellCounter { /** * Test CellCounter with time range all data should print to output */ - @Test (timeout=300000) + @Test public void testCellCounteEndTimeRange() throws Exception { final TableName sourceTable = TableName.valueOf(name.getMethodName()); byte[][] families = { FAMILY_A, FAMILY_B }; @@ -243,7 +243,7 @@ public class TestCellCounter { /** * Test CellCounter with time range all data should print to output */ - @Test (timeout=300000) + @Test public void testCellCounteOutOfTimeRange() throws Exception { final TableName sourceTable = TableName.valueOf(name.getMethodName()); byte[][] families = { FAMILY_A, FAMILY_B }; @@ -288,7 +288,7 @@ public class TestCellCounter { /** * Test main method of CellCounter */ - @Test (timeout=300000) + @Test public void testCellCounterMain() throws Exception { PrintStream oldPrintStream = System.err; @@ -320,7 +320,7 @@ public class TestCellCounter { /** * Test CellCounter for complete table all data should print to output */ - @Test(timeout = 600000) + @Test public void testCellCounterForCompleteTable() throws Exception { final TableName sourceTable = TableName.valueOf(name.getMethodName()); String outputPath = OUTPUT_DIR + sourceTable; http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java ---------------------------------------------------------------------- diff --git a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java index 8251a3e..562a009 100644 --- a/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java +++ b/hbase-mapreduce/src/test/java/org/apache/hadoop/hbase/mapreduce/TestHRegionPartitioner.java @@ -60,7 +60,7 @@ public class TestHRegionPartitioner { /** * Test HRegionPartitioner */ - @Test (timeout=300000) + @Test public void testHRegionPartitioner() throws Exception { byte[][] families = { Bytes.toBytes("familyA"), Bytes.toBytes("familyB") }; http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureEvents.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureEvents.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureEvents.java index 05dab7f..cd56c46 100644 --- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureEvents.java +++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureEvents.java @@ -80,7 +80,7 @@ public class TestProcedureEvents { fs.delete(logDir, true); } - @Test(timeout=30000) + @Test public void testTimeoutEventProcedure() throws Exception { final int NTIMEOUTS = 5; @@ -92,12 +92,12 @@ public class TestProcedureEvents { assertEquals(NTIMEOUTS + 1, proc.getTimeoutsCount()); } - @Test(timeout=30000) + @Test public void testTimeoutEventProcedureDoubleExecution() throws Exception { testTimeoutEventProcedureDoubleExecution(false); } - @Test(timeout=30000) + @Test public void testTimeoutEventProcedureDoubleExecutionKillIfSuspended() throws Exception { testTimeoutEventProcedureDoubleExecution(true); } http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecution.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecution.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecution.java index e790884..7e660e4 100644 --- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecution.java +++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecution.java @@ -133,7 +133,7 @@ public class TestProcedureExecution { } } - @Test(timeout=30000) + @Test public void testBadSubprocList() { List<String> state = new ArrayList<>(); Procedure subProc2 = new TestSequentialProcedure("subProc2", state); @@ -155,7 +155,7 @@ public class TestProcedureExecution { assertEquals("rootProc-rollback", state.get(3)); } - @Test(timeout=30000) + @Test public void testSingleSequentialProc() { List<String> state = new ArrayList<>(); Procedure subProc2 = new TestSequentialProcedure("subProc2", state); @@ -170,7 +170,7 @@ public class TestProcedureExecution { assertEquals(state.toString(), 3, state.size()); } - @Test(timeout=30000) + @Test public void testSingleSequentialProcRollback() { List<String> state = new ArrayList<>(); Procedure subProc2 = new TestSequentialProcedure("subProc2", state, @@ -221,7 +221,7 @@ public class TestProcedureExecution { protected boolean abort(Void env) { return false; } } - @Test(timeout=30000) + @Test public void testRollbackRetriableFailure() { long procId = ProcedureTestingUtility.submitAndWait(procExecutor, new TestFaultyRollback()); @@ -298,7 +298,7 @@ public class TestProcedureExecution { } } - @Test(timeout=30000) + @Test public void testAbortTimeout() { final int PROC_TIMEOUT_MSEC = 2500; List<String> state = new ArrayList<>(); @@ -317,7 +317,7 @@ public class TestProcedureExecution { assertEquals("wproc-rollback", state.get(1)); } - @Test(timeout=30000) + @Test public void testAbortTimeoutWithChildren() { List<String> state = new ArrayList<>(); Procedure proc = new TestWaitingProcedure("wproc", state, true); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecutor.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecutor.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecutor.java index db19974..1c53098 100644 --- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecutor.java +++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureExecutor.java @@ -75,7 +75,7 @@ public class TestProcedureExecutor { procExecutor.start(numThreads, true); } - @Test(timeout=60000) + @Test public void testWorkerStuck() throws Exception { // replace the executor final Configuration conf = new Configuration(htu.getConfiguration()); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureNonce.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureNonce.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureNonce.java index 7612987..b702314 100644 --- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureNonce.java +++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureNonce.java @@ -85,7 +85,7 @@ public class TestProcedureNonce { fs.delete(logDir, true); } - @Test(timeout=30000) + @Test public void testCompletedProcWithSameNonce() throws Exception { final long nonceGroup = 123; final long nonce = 2222; @@ -111,7 +111,7 @@ public class TestProcedureNonce { ProcedureTestingUtility.assertProcNotFailed(result); } - @Test(timeout=30000) + @Test public void testRunningProcWithSameNonce() throws Exception { final long nonceGroup = 456; final long nonce = 33333; @@ -163,12 +163,12 @@ public class TestProcedureNonce { ProcedureTestingUtility.assertProcFailed(result); } - @Test(timeout=30000) + @Test public void testConcurrentNonceRegistration() throws IOException { testConcurrentNonceRegistration(true, 567, 44444); } - @Test(timeout=30000) + @Test public void testConcurrentNonceRegistrationWithRollback() throws IOException { testConcurrentNonceRegistration(false, 890, 55555); } http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java index 16af843..aece1de 100644 --- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java +++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureRecovery.java @@ -190,7 +190,7 @@ public class TestProcedureRecovery { restart(); } - @Test(timeout=30000) + @Test public void testSingleStepProcRecovery() throws Exception { Procedure proc = new TestSingleStepProcedure(); procExecutor.testing.killBeforeStoreUpdate = true; @@ -216,7 +216,7 @@ public class TestProcedureRecovery { assertEquals(1, Bytes.toInt(result.getResult())); } - @Test(timeout=30000) + @Test public void testMultiStepProcRecovery() throws Exception { // Step 0 - kill Procedure proc = new TestMultiStepProcedure(); @@ -245,7 +245,7 @@ public class TestProcedureRecovery { ProcedureTestingUtility.assertProcNotFailed(result); } - @Test(timeout=30000) + @Test public void testMultiStepRollbackRecovery() throws Exception { // Step 0 - kill Procedure proc = new TestMultiStepProcedure(); @@ -403,7 +403,7 @@ public class TestProcedureRecovery { } } - @Test(timeout=30000) + @Test public void testStateMachineMultipleLevel() throws Exception { long procId = procExecutor.submitProcedure(new TestStateMachineProcedure(true)); // Wait the completion @@ -414,7 +414,7 @@ public class TestProcedureRecovery { assertEquals(4, procExecutor.getLastProcId()); } - @Test(timeout=30000) + @Test public void testStateMachineRecovery() throws Exception { ProcedureTestingUtility.setToggleKillBeforeStoreUpdate(procExecutor, true); ProcedureTestingUtility.setKillBeforeStoreUpdate(procExecutor, true); @@ -452,7 +452,7 @@ public class TestProcedureRecovery { assertEquals(26, Bytes.toInt(result.getResult())); } - @Test(timeout=30000) + @Test public void testStateMachineRollbackRecovery() throws Exception { ProcedureTestingUtility.setToggleKillBeforeStoreUpdate(procExecutor, true); ProcedureTestingUtility.setKillBeforeStoreUpdate(procExecutor, true); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java index 217f982..7d0529e 100644 --- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java +++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureReplayOrder.java @@ -86,7 +86,7 @@ public class TestProcedureReplayOrder { fs.delete(logDir, true); } - @Test(timeout=90000) + @Test public void testSingleStepReplayOrder() throws Exception { final int NUM_PROC_XTHREAD = 32; final int NUM_PROCS = NUM_THREADS * NUM_PROC_XTHREAD; @@ -107,7 +107,7 @@ public class TestProcedureReplayOrder { procEnv.assertSortedExecList(NUM_PROCS); } - @Test(timeout=90000) + @Test public void testMultiStepReplayOrder() throws Exception { final int NUM_PROC_XTHREAD = 24; final int NUM_PROCS = NUM_THREADS * (NUM_PROC_XTHREAD * 2); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSchedulerConcurrency.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSchedulerConcurrency.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSchedulerConcurrency.java index 35ca30b..d3c0ed4 100644 --- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSchedulerConcurrency.java +++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSchedulerConcurrency.java @@ -59,12 +59,12 @@ public class TestProcedureSchedulerConcurrency { procSched.stop(); } - @Test(timeout=60000) + @Test public void testConcurrentWaitWake() throws Exception { testConcurrentWaitWake(false); } - @Test(timeout=60000) + @Test public void testConcurrentWaitWakeBatch() throws Exception { testConcurrentWaitWake(true); } http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java index 393f57a..3da7c11 100644 --- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java +++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/TestProcedureSuspended.java @@ -71,7 +71,7 @@ public class TestProcedureSuspended { procStore.stop(false); } - @Test(timeout=10000) + @Test public void testSuspendWhileHoldingLocks() { final AtomicBoolean lockA = new AtomicBoolean(false); final AtomicBoolean lockB = new AtomicBoolean(false); @@ -125,7 +125,7 @@ public class TestProcedureSuspended { assertEquals(false, lockB.get()); } - @Test(timeout=10000) + @Test public void testYieldWhileHoldingLocks() { final AtomicBoolean lock = new AtomicBoolean(false); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestWALProcedureStore.java ---------------------------------------------------------------------- diff --git a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestWALProcedureStore.java b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestWALProcedureStore.java index 6c7594f..1929c0c 100644 --- a/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestWALProcedureStore.java +++ b/hbase-procedure/src/test/java/org/apache/hadoop/hbase/procedure2/store/wal/TestWALProcedureStore.java @@ -580,7 +580,7 @@ public class TestWALProcedureStore { } } - @Test(timeout=60000) + @Test public void testWalReplayOrder_AB_A() throws Exception { /* * | A B | -> | A | @@ -623,7 +623,7 @@ public class TestWALProcedureStore { }); } - @Test(timeout=60000) + @Test public void testWalReplayOrder_ABC_BAD() throws Exception { /* * | A B C | -> | B A D | http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java index 74d04fc..4e09e1e 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestHBaseTestingUtility.java @@ -78,7 +78,7 @@ public class TestHBaseTestingUtility { * that what we insert in one place doesn't end up in the other. * @throws Exception */ - @Test (timeout=180000) + @Test public void testMultiClusters() throws Exception { // Create three clusters http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/TestJMXConnectorServer.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestJMXConnectorServer.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestJMXConnectorServer.java index fee1439..4d8c015 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestJMXConnectorServer.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestJMXConnectorServer.java @@ -79,7 +79,7 @@ public class TestJMXConnectorServer { /** * This tests to validate the HMaster's ConnectorServer after unauthorised stopMaster call. */ - @Test(timeout = 180000) + @Test public void testHMConnectorServerWhenStopMaster() throws Exception { conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, JMXListener.class.getName() + "," + MyAccessController.class.getName()); @@ -117,7 +117,7 @@ public class TestJMXConnectorServer { * This tests to validate the RegionServer's ConnectorServer after unauthorised stopRegionServer * call. */ - @Test(timeout = 180000) + @Test public void testRSConnectorServerWhenStopRegionServer() throws Exception { conf.set(CoprocessorHost.REGIONSERVER_COPROCESSOR_CONF_KEY, JMXListener.class.getName() + "," + MyAccessController.class.getName()); @@ -147,7 +147,7 @@ public class TestJMXConnectorServer { /** * This tests to validate the HMaster's ConnectorServer after unauthorised shutdown call. */ - @Test(timeout = 180000) + @Test public void testHMConnectorServerWhenShutdownCluster() throws Exception { conf.set(CoprocessorHost.MASTER_COPROCESSOR_CONF_KEY, JMXListener.class.getName() + "," + MyAccessController.class.getName()); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNamespace.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNamespace.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNamespace.java index f1c42ce..c9db891 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNamespace.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNamespace.java @@ -288,7 +288,7 @@ public class TestNamespace { admin.deleteTable(desc.getTableName()); } - @Test(timeout = 60000) + @Test public void testNamespaceOperations() throws IOException { admin.createNamespace(NamespaceDescriptor.create(prefix + "ns1").build()); admin.createNamespace(NamespaceDescriptor.create(prefix + "ns2").build()); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNodeHealthCheckChore.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNodeHealthCheckChore.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNodeHealthCheckChore.java index 15f0411..c3a6f0c 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNodeHealthCheckChore.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestNodeHealthCheckChore.java @@ -62,19 +62,19 @@ public class TestNodeHealthCheckChore { if (!fs.mkdirs(testDir)) throw new IOException("Failed mkdir " + testDir); } - @Test(timeout=60000) + @Test public void testHealthCheckerSuccess() throws Exception { String normalScript = "echo \"I am all fine\""; healthCheckerTest(normalScript, HealthCheckerExitStatus.SUCCESS); } - @Test(timeout=60000) + @Test public void testHealthCheckerFail() throws Exception { String errorScript = "echo ERROR" + eol + "echo \"Node not healthy\""; healthCheckerTest(errorScript, HealthCheckerExitStatus.FAILED); } - @Test(timeout=60000) + @Test public void testHealthCheckerTimeout() throws Exception { String timeOutScript = "sleep 10" + eol + "echo \"I am fine\""; healthCheckerTest(timeOutScript, HealthCheckerExitStatus.TIMED_OUT); @@ -99,7 +99,7 @@ public class TestNodeHealthCheckChore { this.healthScriptFile.delete(); } - @Test(timeout=60000) + @Test public void testRSHealthChore() throws Exception{ Stoppable stop = new StoppableImplementation(); Configuration conf = getConfForNodeHealthScript(); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java index 2224219..ed37713 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestRegionRebalancing.java @@ -103,7 +103,7 @@ public class TestRegionRebalancing { * @throws IOException * @throws InterruptedException */ - @Test (timeout=300000) + @Test public void testRebalanceOnRegionServerNumberChange() throws IOException, InterruptedException { try(Connection connection = ConnectionFactory.createConnection(UTIL.getConfiguration()); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/TestStochasticBalancerJmxMetrics.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestStochasticBalancerJmxMetrics.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestStochasticBalancerJmxMetrics.java index c418b5f..99b40af 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/TestStochasticBalancerJmxMetrics.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/TestStochasticBalancerJmxMetrics.java @@ -124,7 +124,7 @@ public class TestStochasticBalancerJmxMetrics extends BalancerTestBase { /** * In Ensemble mode, there should be only one ensemble table */ - @Test (timeout=60000) + @Test public void testJmxMetrics_EnsembleMode() throws Exception { loadBalancer = new StochasticLoadBalancer(); @@ -153,7 +153,7 @@ public class TestStochasticBalancerJmxMetrics extends BalancerTestBase { /** * In per-table mode, each table has a set of metrics */ - @Test (timeout=60000) + @Test public void testJmxMetrics_PerTableMode() throws Exception { loadBalancer = new StochasticLoadBalancer(); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/backup/example/TestZooKeeperTableArchiveClient.java ---------------------------------------------------------------------- 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 e29e168..f3e193e1 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 @@ -140,7 +140,7 @@ public class TestZooKeeperTableArchiveClient { /** * Test turning on/off archiving */ - @Test (timeout=300000) + @Test public void testArchivingEnableDisable() throws Exception { // 1. turn on hfile backups LOG.debug("----Starting archiving"); @@ -163,7 +163,7 @@ public class TestZooKeeperTableArchiveClient { archivingClient.getArchivingEnabled(TABLE_NAME)); } - @Test (timeout=300000) + @Test public void testArchivingOnSingleTable() throws Exception { createArchiveDirectory(); FileSystem fs = UTIL.getTestFileSystem(); @@ -211,7 +211,7 @@ public class TestZooKeeperTableArchiveClient { * Test archiving/cleaning across multiple tables, where some are retained, and others aren't * @throws Exception on failure */ - @Test (timeout=300000) + @Test public void testMultipleTables() throws Exception { createArchiveDirectory(); String otherTable = "otherTable"; http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java index 0e8a3e6..c48d130 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin1.java @@ -114,7 +114,7 @@ public class TestAdmin1 { } } - @Test (timeout=300000) + @Test public void testSplitFlushCompactUnknownTable() throws InterruptedException { final TableName unknowntable = TableName.valueOf(name.getMethodName()); Exception exception = null; @@ -142,7 +142,7 @@ public class TestAdmin1 { assertTrue(exception instanceof TableNotFoundException); } - @Test (timeout=300000) + @Test public void testDeleteEditUnknownColumnFamilyAndOrTable() throws IOException { // Test we get exception if we try to final TableName nonexistentTable = TableName.valueOf("nonexistent"); @@ -236,7 +236,7 @@ public class TestAdmin1 { } } - @Test (timeout=300000) + @Test public void testDisableAndEnableTable() throws IOException { final byte [] row = Bytes.toBytes("row"); final byte [] qualifier = Bytes.toBytes("qualifier"); @@ -301,7 +301,7 @@ public class TestAdmin1 { return state.getState(); } - @Test (timeout=300000) + @Test public void testDisableAndEnableTables() throws IOException { final byte [] row = Bytes.toBytes("row"); final byte [] qualifier = Bytes.toBytes("qualifier"); @@ -359,7 +359,7 @@ public class TestAdmin1 { assertEquals(TableState.State.ENABLED, getStateFromMeta(table2)); } - @Test (timeout=300000) + @Test public void testCreateTable() throws IOException { HTableDescriptor [] tables = admin.listTables(); int numTables = tables.length; @@ -373,12 +373,12 @@ public class TestAdmin1 { assertEquals(TableState.State.ENABLED, getStateFromMeta(tableName)); } - @Test (timeout=300000) + @Test public void testTruncateTable() throws IOException { testTruncateTable(TableName.valueOf(name.getMethodName()), false); } - @Test (timeout=300000) + @Test public void testTruncateTablePreservingSplits() throws IOException { testTruncateTable(TableName.valueOf(name.getMethodName()), true); } @@ -415,7 +415,7 @@ public class TestAdmin1 { } } - @Test (timeout=300000) + @Test public void testGetTableDescriptor() throws IOException { HColumnDescriptor fam1 = new HColumnDescriptor("fam1"); HColumnDescriptor fam2 = new HColumnDescriptor("fam2"); @@ -432,7 +432,7 @@ public class TestAdmin1 { table.close(); } - @Test (timeout=300000) + @Test public void testCompactionTimestamps() throws Exception { HColumnDescriptor fam1 = new HColumnDescriptor("fam1"); final TableName tableName = TableName.valueOf(name.getMethodName()); @@ -486,7 +486,7 @@ public class TestAdmin1 { table.close(); } - @Test (timeout=300000) + @Test public void testHColumnValidName() { boolean exceptionThrown; try { @@ -502,7 +502,7 @@ public class TestAdmin1 { * @throws IOException * @throws InterruptedException */ - @Test (timeout=300000) + @Test public void testOnlineChangeTableSchema() throws IOException, InterruptedException { final TableName tableName = TableName.valueOf(name.getMethodName()); HTableDescriptor [] tables = admin.listTables(); @@ -618,7 +618,7 @@ public class TestAdmin1 { } } - @Test (timeout=300000) + @Test public void testCreateTableNumberOfRegions() throws IOException, InterruptedException { final TableName tableName = TableName.valueOf(name.getMethodName()); HTableDescriptor desc = new HTableDescriptor(tableName); @@ -668,7 +668,7 @@ public class TestAdmin1 { } } - @Test (timeout=300000) + @Test public void testCreateTableWithRegions() throws IOException, InterruptedException { final TableName tableName = TableName.valueOf(name.getMethodName()); @@ -844,7 +844,7 @@ public class TestAdmin1 { } } - @Test (timeout=300000) + @Test public void testTableAvailableWithRandomSplitKeys() throws Exception { final TableName tableName = TableName.valueOf(name.getMethodName()); HTableDescriptor desc = new HTableDescriptor(tableName); @@ -859,7 +859,7 @@ public class TestAdmin1 { assertFalse("Table should be created with 1 row in META", tableAvailable); } - @Test (timeout=300000) + @Test public void testCreateTableWithOnlyEmptyStartRow() throws IOException { final byte[] tableName = Bytes.toBytes(name.getMethodName()); byte[][] splitKeys = new byte[1][]; @@ -873,7 +873,7 @@ public class TestAdmin1 { } } - @Test (timeout=300000) + @Test public void testCreateTableWithEmptyRowInTheSplitKeys() throws IOException{ final byte[] tableName = Bytes.toBytes(name.getMethodName()); byte[][] splitKeys = new byte[3][]; @@ -890,7 +890,7 @@ public class TestAdmin1 { } } - @Test (timeout=120000) + @Test public void testTableExist() throws IOException { final TableName table = TableName.valueOf(name.getMethodName()); boolean exist; @@ -906,7 +906,7 @@ public class TestAdmin1 { * @throws Exception * @throws IOException */ - @Test (timeout=400000) + @Test public void testForceSplit() throws Exception { byte[][] familyNames = new byte[][] { Bytes.toBytes("cf") }; int[] rowCounts = new int[] { 6000 }; @@ -925,7 +925,7 @@ public class TestAdmin1 { * * @throws IOException */ - @Test (timeout=300000) + @Test public void testEnableTableRetainAssignment() throws IOException { final TableName tableName = TableName.valueOf(name.getMethodName()); byte[][] splitKeys = { new byte[] { 1, 1, 1 }, new byte[] { 2, 2, 2 }, @@ -961,7 +961,7 @@ public class TestAdmin1 { * @throws Exception * @throws IOException */ - @Test (timeout=800000) + @Test public void testForceSplitMultiFamily() throws Exception { int numVersions = HColumnDescriptor.DEFAULT_VERSIONS; @@ -1234,12 +1234,12 @@ public class TestAdmin1 { assertTrue(gotException); } - @Test (expected=IllegalArgumentException.class, timeout=300000) + @Test (expected=IllegalArgumentException.class) public void testInvalidHColumnDescriptor() throws IOException { new HColumnDescriptor("/cfamily/name"); } - @Test (timeout=300000) + @Test public void testEnableDisableAddColumnDeleteColumn() throws Exception { final TableName tableName = TableName.valueOf(name.getMethodName()); TEST_UTIL.createTable(tableName, HConstants.CATALOG_FAMILY).close(); @@ -1264,7 +1264,7 @@ public class TestAdmin1 { this.admin.deleteTable(tableName); } - @Test (timeout=300000) + @Test public void testDeleteLastColumnFamily() throws Exception { final TableName tableName = TableName.valueOf(name.getMethodName()); TEST_UTIL.createTable(tableName, HConstants.CATALOG_FAMILY).close(); @@ -1297,7 +1297,7 @@ public class TestAdmin1 { * Test DFS replication for column families, where one CF has default replication(3) and the other * is set to 1. */ - @Test(timeout = 300000) + @Test public void testHFileReplication() throws Exception { final TableName tableName = TableName.valueOf(this.name.getMethodName()); String fn1 = "rep1"; @@ -1348,7 +1348,7 @@ public class TestAdmin1 { } } - @Test (timeout=300000) + @Test public void testMergeRegions() throws Exception { final TableName tableName = TableName.valueOf(name.getMethodName()); HColumnDescriptor cd = new HColumnDescriptor("d"); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java index fee7f58..f1293f1 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAdmin2.java @@ -118,7 +118,7 @@ public class TestAdmin2 { } } - @Test (timeout=300000) + @Test public void testCreateBadTables() throws IOException { String msg = null; try { @@ -175,7 +175,7 @@ public class TestAdmin2 { * Test for hadoop-1581 'HBASE: Unopenable tablename bug'. * @throws Exception */ - @Test (timeout=300000) + @Test public void testTableNameClash() throws Exception { final String name = this.name.getMethodName(); HTableDescriptor htd1 = new HTableDescriptor(TableName.valueOf(name + "SOMEUPPERCASE")); @@ -195,7 +195,7 @@ public class TestAdmin2 { * issue anymore * @throws Exception */ - @Test (timeout=300000) + @Test public void testCreateTableRPCTimeOut() throws Exception { final String name = this.name.getMethodName(); int oldTimeout = TEST_UTIL.getConfiguration(). @@ -219,7 +219,7 @@ public class TestAdmin2 { * Test read only tables * @throws Exception */ - @Test (timeout=300000) + @Test public void testReadOnlyTable() throws Exception { final TableName name = TableName.valueOf(this.name.getMethodName()); Table table = TEST_UTIL.createTable(name, HConstants.CATALOG_FAMILY); @@ -236,7 +236,7 @@ public class TestAdmin2 { * start with same. HBASE-771 * @throws IOException */ - @Test (timeout=300000) + @Test public void testTableNames() throws IOException { byte[][] illegalNames = new byte[][] { Bytes.toBytes("-bad"), @@ -265,7 +265,7 @@ public class TestAdmin2 { * For HADOOP-2579 * @throws IOException */ - @Test (expected=TableExistsException.class, timeout=300000) + @Test (expected=TableExistsException.class) public void testTableExistsExceptionWithATable() throws IOException { final TableName name = TableName.valueOf(this.name.getMethodName()); TEST_UTIL.createTable(name, HConstants.CATALOG_FAMILY).close(); @@ -276,7 +276,7 @@ public class TestAdmin2 { * Can't disable a table if the table isn't in enabled state * @throws IOException */ - @Test (expected=TableNotEnabledException.class, timeout=300000) + @Test (expected=TableNotEnabledException.class) public void testTableNotEnabledExceptionWithATable() throws IOException { final TableName name = TableName.valueOf(this.name.getMethodName()); TEST_UTIL.createTable(name, HConstants.CATALOG_FAMILY).close(); @@ -288,7 +288,7 @@ public class TestAdmin2 { * Can't enable a table if the table isn't in disabled state * @throws IOException */ - @Test (expected=TableNotDisabledException.class, timeout=300000) + @Test (expected=TableNotDisabledException.class) public void testTableNotDisabledExceptionWithATable() throws IOException { final TableName name = TableName.valueOf(this.name.getMethodName()); Table t = TEST_UTIL.createTable(name, HConstants.CATALOG_FAMILY); @@ -303,7 +303,7 @@ public class TestAdmin2 { * For HADOOP-2579 * @throws IOException */ - @Test (expected=TableNotFoundException.class, timeout=300000) + @Test (expected=TableNotFoundException.class) public void testTableNotFoundExceptionWithoutAnyTables() throws IOException { TableName tableName = TableName .valueOf("testTableNotFoundExceptionWithoutAnyTables"); @@ -311,7 +311,7 @@ public class TestAdmin2 { ht.get(new Get(Bytes.toBytes("e"))); } - @Test (timeout=300000) + @Test public void testShouldUnassignTheRegion() throws Exception { final TableName tableName = TableName.valueOf(name.getMethodName()); createTableWithDefaultConf(tableName); @@ -338,7 +338,7 @@ public class TestAdmin2 { isInList); } - @Test (timeout=300000) + @Test public void testCloseRegionIfInvalidRegionNameIsPassed() throws Exception { final String name = this.name.getMethodName(); byte[] tableName = Bytes.toBytes(name); @@ -364,7 +364,7 @@ public class TestAdmin2 { onlineRegions.contains(info)); } - @Test (timeout=300000) + @Test public void testCloseRegionThatFetchesTheHRIFromMeta() throws Exception { final TableName tableName = TableName.valueOf(name.getMethodName()); createTableWithDefaultConf(tableName); @@ -421,7 +421,7 @@ public class TestAdmin2 { * For HBASE-2556 * @throws IOException */ - @Test (timeout=300000) + @Test public void testGetTableRegions() throws IOException { final TableName tableName = TableName.valueOf(name.getMethodName()); @@ -443,7 +443,7 @@ public class TestAdmin2 { expectedRegions, RegionInfos.size()); } - @Test (timeout=300000) + @Test public void testMoveToPreviouslyAssignedRS() throws IOException, InterruptedException { MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster(); HMaster master = cluster.getMaster(); @@ -458,7 +458,7 @@ public class TestAdmin2 { am.getRegionStates().getRegionServerOfRegion(hri)); } - @Test (timeout=300000) + @Test public void testWALRollWriting() throws Exception { setUpforLogRolling(); String className = this.getClass().getName(); @@ -557,7 +557,7 @@ public class TestAdmin2 { /** * Check that we have an exception if the cluster is not there. */ - @Test (timeout=300000) + @Test public void testCheckHBaseAvailableWithoutCluster() { Configuration conf = new Configuration(TEST_UTIL.getConfiguration()); @@ -578,7 +578,7 @@ public class TestAdmin2 { " HBase was not available"); } - @Test (timeout=300000) + @Test public void testDisableCatalogTable() throws Exception { try { this.admin.disableTable(TableName.META_TABLE_NAME); @@ -594,7 +594,7 @@ public class TestAdmin2 { TEST_UTIL.getHBaseAdmin().createTable(htd); } - @Test (timeout=300000) + @Test public void testIsEnabledOrDisabledOnUnknownTable() throws Exception { try { admin.isTableEnabled(TableName.valueOf(name.getMethodName())); @@ -609,7 +609,7 @@ public class TestAdmin2 { } } - @Test (timeout=300000) + @Test public void testGetRegion() throws Exception { // We use actual HBaseAdmin instance instead of going via Admin interface in // here because makes use of an internal HBA method (TODO: Fix.). @@ -630,7 +630,7 @@ public class TestAdmin2 { } } - @Test(timeout = 30000) + @Test public void testBalancer() throws Exception { boolean initialState = admin.isBalancerEnabled(); @@ -652,7 +652,7 @@ public class TestAdmin2 { assertEquals(initialState, admin.isBalancerEnabled()); } - @Test(timeout = 30000) + @Test public void testRegionNormalizer() throws Exception { boolean initialState = admin.isNormalizerEnabled(); @@ -674,7 +674,7 @@ public class TestAdmin2 { assertEquals(initialState, admin.isNormalizerEnabled()); } - @Test(timeout = 30000) + @Test public void testAbortProcedureFail() throws Exception { Random randomGenerator = new Random(); long procId = randomGenerator.nextLong(); @@ -683,19 +683,19 @@ public class TestAdmin2 { assertFalse(abortResult); } - @Test(timeout = 300000) + @Test public void testGetProcedures() throws Exception { String procList = admin.getProcedures(); assertTrue(procList.startsWith("[")); } - @Test(timeout = 300000) + @Test public void testGetLocks() throws Exception { String lockList = admin.getLocks(); assertTrue(lockList.startsWith("[")); } - @Test(timeout = 30000) + @Test public void testDecommissionRegionServers() throws Exception { List<ServerName> decommissionedRegionServers = admin.listDecommissionedRegionServers(); assertTrue(decommissionedRegionServers.isEmpty()); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncDecommissionAdminApi.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncDecommissionAdminApi.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncDecommissionAdminApi.java index 9321ced1..14a881b 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncDecommissionAdminApi.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncDecommissionAdminApi.java @@ -44,7 +44,7 @@ public class TestAsyncDecommissionAdminApi extends TestAsyncAdminBase { public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestAsyncDecommissionAdminApi.class); - @Test(timeout = 30000) + @Test public void testAsyncDecommissionRegionServers() throws Exception { List<ServerName> decommissionedRegionServers = admin.listDecommissionedRegionServers().get(); assertTrue(decommissionedRegionServers.isEmpty()); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNamespaceAdminApi.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNamespaceAdminApi.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNamespaceAdminApi.java index ed692cb..f74b095 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNamespaceAdminApi.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestAsyncNamespaceAdminApi.java @@ -75,7 +75,7 @@ public class TestAsyncNamespaceAdminApi extends TestAsyncAdminBase { LOG.info("Done initializing cluster"); } - @Test(timeout = 60000) + @Test public void testCreateAndDelete() throws Exception { String testName = "testCreateAndDelete"; String nsName = prefix + "_" + testName; @@ -97,7 +97,7 @@ public class TestAsyncNamespaceAdminApi extends TestAsyncAdminBase { assertNull(zkNamespaceManager.get(nsName)); } - @Test(timeout = 60000) + @Test public void testDeleteReservedNS() throws Exception { boolean exceptionCaught = false; try { @@ -119,7 +119,7 @@ public class TestAsyncNamespaceAdminApi extends TestAsyncAdminBase { } } - @Test(timeout = 60000) + @Test public void testNamespaceOperations() throws Exception { admin.createNamespace(NamespaceDescriptor.create(prefix + "ns1").build()).join(); admin.createNamespace(NamespaceDescriptor.create(prefix + "ns2").build()).join(); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java index 456434f..48d9a93 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestClientPushback.java @@ -92,7 +92,7 @@ public class TestClientPushback { UTIL.shutdownMiniCluster(); } - @Test(timeout=60000) + @Test public void testClientTracksServerPushback() throws Exception{ Configuration conf = UTIL.getConfiguration(); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestEnableTable.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestEnableTable.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestEnableTable.java index f996de6..3b807aa 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestEnableTable.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestEnableTable.java @@ -85,7 +85,7 @@ public class TestEnableTable { TEST_UTIL.shutdownMiniCluster(); } - @Test(timeout = 300000) + @Test public void testEnableTableWithNoRegionServers() throws Exception { final TableName tableName = TableName.valueOf(name.getMethodName()); final MiniHBaseCluster cluster = TEST_UTIL.getHBaseCluster(); @@ -149,7 +149,7 @@ public class TestEnableTable { * @throws IOException * @throws InterruptedException */ - @Test(timeout=60000) + @Test public void testDeleteForSureClearsAllTableRowsFromMeta() throws IOException, InterruptedException { final TableName tableName = TableName.valueOf(name.getMethodName()); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java index 60c124a..82cf802 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide3.java @@ -269,7 +269,7 @@ public class TestFromClientSide3 { } // override the config settings at the CF level and ensure priority - @Test(timeout = 60000) + @Test public void testAdvancedConfigOverride() throws Exception { /* * Overall idea: (1) create 3 store files and issue a compaction. config's @@ -681,7 +681,7 @@ public class TestFromClientSide3 { assertTrue(con.hasCellBlockSupport()); } - @Test(timeout = 60000) + @Test public void testPutWithPreBatchMutate() throws Exception { final TableName tableName = TableName.valueOf(name.getMethodName()); testPreBatchMutate(tableName, () -> { @@ -696,7 +696,7 @@ public class TestFromClientSide3 { }); } - @Test(timeout = 60000) + @Test public void testRowMutationsWithPreBatchMutate() throws Exception { final TableName tableName = TableName.valueOf(name.getMethodName()); testPreBatchMutate(tableName, () -> { @@ -743,7 +743,7 @@ public class TestFromClientSide3 { TEST_UTIL.deleteTable(tableName); } - @Test(timeout = 30000) + @Test public void testLockLeakWithDelta() throws Exception, Throwable { final TableName tableName = TableName.valueOf(name.getMethodName()); HTableDescriptor desc = new HTableDescriptor(tableName); @@ -796,7 +796,7 @@ public class TestFromClientSide3 { assertEquals(0, readLockCount); } - @Test(timeout = 30000) + @Test public void testMultiRowMutations() throws Exception, Throwable { final TableName tableName = TableName.valueOf(name.getMethodName()); HTableDescriptor desc = new HTableDescriptor(tableName); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java index f2f01ad..7cab2d1 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestMultiParallel.java @@ -178,7 +178,7 @@ public class TestMultiParallel { * @throws NoSuchFieldException * @throws SecurityException */ - @Test(timeout=300000) + @Test public void testActiveThreadsCount() throws Exception { UTIL.getConfiguration().setLong("hbase.htable.threads.coresize", slaves + 1); try (Connection connection = ConnectionFactory.createConnection(UTIL.getConfiguration())) { @@ -202,7 +202,7 @@ public class TestMultiParallel { } } - @Test(timeout=300000) + @Test public void testBatchWithGet() throws Exception { LOG.info("test=testBatchWithGet"); Table table = UTIL.getConnection().getTable(TEST_TABLE); @@ -271,7 +271,7 @@ public class TestMultiParallel { table.close(); } - @Test (timeout=300000) + @Test public void testFlushCommitsNoAbort() throws Exception { LOG.info("test=testFlushCommitsNoAbort"); doTestFlushCommits(false); @@ -283,7 +283,7 @@ public class TestMultiParallel { * * @throws Exception */ - @Test (timeout=360000) + @Test public void testFlushCommitsWithAbort() throws Exception { LOG.info("test=testFlushCommitsWithAbort"); doTestFlushCommits(true); @@ -354,7 +354,7 @@ public class TestMultiParallel { LOG.info("done"); } - @Test (timeout=300000) + @Test public void testBatchWithPut() throws Exception { LOG.info("test=testBatchWithPut"); Table table = CONNECTION.getTable(TEST_TABLE); @@ -387,7 +387,7 @@ public class TestMultiParallel { table.close(); } - @Test(timeout=300000) + @Test public void testBatchWithDelete() throws Exception { LOG.info("test=testBatchWithDelete"); Table table = UTIL.getConnection().getTable(TEST_TABLE); @@ -418,7 +418,7 @@ public class TestMultiParallel { table.close(); } - @Test(timeout=300000) + @Test public void testHTableDeleteWithList() throws Exception { LOG.info("test=testHTableDeleteWithList"); Table table = UTIL.getConnection().getTable(TEST_TABLE); @@ -448,7 +448,7 @@ public class TestMultiParallel { table.close(); } - @Test(timeout=300000) + @Test public void testBatchWithManyColsInOneRowGetAndPut() throws Exception { LOG.info("test=testBatchWithManyColsInOneRowGetAndPut"); Table table = UTIL.getConnection().getTable(TEST_TABLE); @@ -487,7 +487,7 @@ public class TestMultiParallel { table.close(); } - @Test(timeout=300000) + @Test public void testBatchWithIncrementAndAppend() throws Exception { LOG.info("test=testBatchWithIncrementAndAppend"); final byte[] QUAL1 = Bytes.toBytes("qual1"); @@ -522,7 +522,7 @@ public class TestMultiParallel { table.close(); } - @Test(timeout=300000) + @Test public void testNonceCollision() throws Exception { LOG.info("test=testNonceCollision"); final Connection connection = ConnectionFactory.createConnection(UTIL.getConfiguration()); @@ -622,7 +622,7 @@ public class TestMultiParallel { } } - @Test(timeout=300000) + @Test public void testBatchWithMixedActions() throws Exception { LOG.info("test=testBatchWithMixedActions"); Table table = UTIL.getConnection().getTable(TEST_TABLE); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java index 686a8a4..046b6f8 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestReplicaWithCluster.java @@ -280,7 +280,7 @@ public class TestReplicaWithCluster { HTU.shutdownMiniCluster(); } - @Test (timeout=30000) + @Test public void testCreateDeleteTable() throws IOException { // Create table then get the single region for our new table. HTableDescriptor hdt = HTU.createTableDescriptor("testCreateDeleteTable"); @@ -313,7 +313,7 @@ public class TestReplicaWithCluster { HTU.deleteTable(hdt.getTableName()); } - @Test (timeout=120000) + @Test public void testChangeTable() throws Exception { TableDescriptor td = TableDescriptorBuilder.newBuilder(TableName.valueOf("testChangeTable")) .setRegionReplication(NB_SERVERS) @@ -373,7 +373,7 @@ public class TestReplicaWithCluster { } @SuppressWarnings("deprecation") - @Test (timeout=300000) + @Test public void testReplicaAndReplication() throws Exception { HTableDescriptor hdt = HTU.createTableDescriptor("testReplicaAndReplication"); hdt.setRegionReplication(NB_SERVERS); @@ -457,7 +457,7 @@ public class TestReplicaWithCluster { // the minicluster has negative impact of deleting all HConnections in JVM. } - @Test (timeout=30000) + @Test public void testBulkLoad() throws IOException { // Create table then get the single region for our new table. LOG.debug("Creating test table"); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java ---------------------------------------------------------------------- diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java index d7f4464..45da2c6 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java @@ -102,7 +102,7 @@ public class TestScannerTimeout { * from failed. Before 2772, it reused the same scanner id. * @throws Exception */ - @Test(timeout=300000) + @Test public void test2772() throws Exception { LOG.info("START************ test2772"); HRegionServer rs = TEST_UTIL.getRSForFirstRegionInTable(TABLE_NAME); @@ -133,7 +133,7 @@ public class TestScannerTimeout { * from failed. Before 3686, it would skip rows in the scan. * @throws Exception */ - @Test(timeout=300000) + @Test public void test3686a() throws Exception { LOG.info("START ************ TEST3686A---1"); HRegionServer rs = TEST_UTIL.getRSForFirstRegionInTable(TABLE_NAME); @@ -179,7 +179,7 @@ public class TestScannerTimeout { * client. * @throws Exception */ - @Test(timeout=300000) + @Test public void test3686b() throws Exception { LOG.info("START ************ test3686b"); HRegionServer rs = TEST_UTIL.getRSForFirstRegionInTable(TABLE_NAME); http://git-wip-us.apache.org/repos/asf/hbase/blob/8f1e01b6/hbase-server/src/test/java/org/apache/hadoop/hbase/client/TestSnapshotFromClient.java ---------------------------------------------------------------------- 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 7ce130c..b46404f 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 @@ -148,7 +148,7 @@ public class TestSnapshotFromClient { * Test snapshotting not allowed hbase:meta and -ROOT- * @throws Exception */ - @Test (timeout=300000) + @Test public void testMetaTablesSnapshot() throws Exception { Admin admin = UTIL.getAdmin(); byte[] snapshotName = Bytes.toBytes("metaSnapshot"); @@ -166,7 +166,7 @@ public class TestSnapshotFromClient { * * @throws Exception */ - @Test (timeout=300000) + @Test public void testSnapshotDeletionWithRegex() throws Exception { Admin admin = UTIL.getAdmin(); // make sure we don't fail on listing snapshots @@ -202,7 +202,7 @@ public class TestSnapshotFromClient { * Test snapshotting a table that is offline * @throws Exception */ - @Test (timeout=300000) + @Test public void testOfflineTableSnapshot() throws Exception { Admin admin = UTIL.getAdmin(); // make sure we don't fail on listing snapshots @@ -250,7 +250,7 @@ public class TestSnapshotFromClient { SnapshotTestingUtils.assertNoSnapshots(admin); } - @Test (timeout=300000) + @Test public void testSnapshotFailsOnNonExistantTable() throws Exception { Admin admin = UTIL.getAdmin(); // make sure we don't fail on listing snapshots @@ -279,7 +279,7 @@ public class TestSnapshotFromClient { } } - @Test (timeout=300000) + @Test public void testOfflineTableSnapshotWithEmptyRegions() throws Exception { // test with an empty table with one region @@ -323,7 +323,7 @@ public class TestSnapshotFromClient { SnapshotTestingUtils.assertNoSnapshots(admin); } - @Test(timeout = 300000) + @Test public void testListTableSnapshots() throws Exception { Admin admin = null; final TableName tableName = TableName.valueOf(name.getMethodName()); @@ -369,7 +369,7 @@ public class TestSnapshotFromClient { } } - @Test(timeout = 300000) + @Test public void testListTableSnapshotsWithRegex() throws Exception { Admin admin = null; try { @@ -408,7 +408,7 @@ public class TestSnapshotFromClient { } } - @Test(timeout = 300000) + @Test public void testDeleteTableSnapshots() throws Exception { Admin admin = null; final TableName tableName = TableName.valueOf(name.getMethodName()); @@ -443,7 +443,7 @@ public class TestSnapshotFromClient { } } - @Test(timeout = 300000) + @Test public void testDeleteTableSnapshotsWithRegex() throws Exception { Admin admin = null; Pattern tableNamePattern = Pattern.compile("test.*");