From f5944d1a72544d9c814559a89ea53b26e572235c Mon Sep 17 00:00:00 2001
From: Zhihong Yu
Date: Wed, 9 Nov 2011 22:37:32 +0000
Subject: [PATCH] HBASE-4737 Addendum tags SmallTests
git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1200012 13f79535-47bb-0310-9956-ffa450edef68
---
.../org/apache/hadoop/hbase/TestCompare.java | 4 +++-
.../TestFSTableDescriptorForceCreation.java | 4 +++-
.../hadoop/hbase/TestHRegionLocation.java | 4 +++-
.../hadoop/hbase/TestHServerAddress.java | 4 +++-
.../apache/hadoop/hbase/TestHServerInfo.java | 2 ++
.../org/apache/hadoop/hbase/TestKeyValue.java | 2 ++
.../hadoop/hbase/TestSerialization.java | 3 +++
.../hadoop/hbase/avro/TestAvroUtil.java | 3 +++
.../client/HConnectionTestingUtility.java | 3 +++
.../hadoop/hbase/client/TestAttributes.java | 3 +++
.../apache/hadoop/hbase/client/TestGet.java | 3 +++
.../hadoop/hbase/client/TestOperation.java | 6 ++++-
.../hadoop/hbase/client/TestResult.java | 3 +++
.../apache/hadoop/hbase/client/TestScan.java | 3 +++
.../coprocessor/TestCoprocessorInterface.java | 13 ++++------
.../TestRegionObserverStacking.java | 9 +++----
.../hbase/executor/TestExecutorService.java | 8 ++++---
.../hbase/filter/TestBitComparator.java | 3 +++
.../filter/TestColumnPaginationFilter.java | 3 +++
.../hbase/filter/TestColumnPrefixFilter.java | 9 +++----
.../filter/TestDependentColumnFilter.java | 8 +++----
.../hadoop/hbase/filter/TestFilter.java | 9 +++----
.../hadoop/hbase/filter/TestFilterList.java | 3 +++
.../hbase/filter/TestInclusiveStopFilter.java | 5 +++-
.../TestMultipleColumnPrefixFilter.java | 9 +++----
.../hadoop/hbase/filter/TestPageFilter.java | 3 +++
.../hadoop/hbase/filter/TestParseFilter.java | 9 +++----
.../hadoop/hbase/filter/TestPrefixFilter.java | 5 +++-
.../hbase/filter/TestRandomRowFilter.java | 5 +++-
.../TestSingleColumnValueExcludeFilter.java | 3 +++
.../filter/TestSingleColumnValueFilter.java | 3 +++
.../hbase/io/TestHalfStoreFileReader.java | 6 ++---
.../hbase/io/TestHbaseObjectWritable.java | 5 ++--
.../apache/hadoop/hbase/io/TestHeapSize.java | 3 +++
.../hbase/io/TestImmutableBytesWritable.java | 4 ++++
.../TestBlockCacheColumnFamilySummary.java | 3 +++
.../hbase/io/hfile/TestCachedBlockQueue.java | 5 +++-
.../hbase/io/hfile/TestFixedFileTrailer.java | 1 +
.../hadoop/hbase/io/hfile/TestHFile.java | 1 +
.../hbase/io/hfile/TestHFileBlockIndex.java | 1 +
.../hbase/io/hfile/TestHFilePerformance.java | 1 +
.../hbase/io/hfile/TestHFileReaderV1.java | 3 +++
.../hadoop/hbase/io/hfile/TestHFileSeek.java | 3 +++
.../hbase/io/hfile/TestHFileWriterV2.java | 5 ++--
.../hadoop/hbase/io/hfile/TestReseekTo.java | 5 +++-
.../hadoop/hbase/io/hfile/TestSeekTo.java | 5 ++--
.../io/hfile/slab/TestSingleSizeCache.java | 1 +
.../hadoop/hbase/io/hfile/slab/TestSlab.java | 4 ++++
.../hbase/io/hfile/slab/TestSlabCache.java | 4 ++++
.../hadoop/hbase/ipc/TestDelayedRpc.java | 3 +++
.../TestSimpleTotalOrderPartitioner.java | 5 ++--
.../hbase/mapreduce/TestTableSplit.java | 3 +++
.../hbase/master/TestCatalogJanitor.java | 14 +++--------
.../hbase/master/TestClockSkewDetection.java | 10 ++++----
.../hadoop/hbase/master/TestDeadServer.java | 6 +++--
.../hbase/master/TestDefaultLoadBalancer.java | 6 ++---
.../hbase/master/TestMasterStatusServlet.java | 2 ++
.../hbase/metrics/TestMetricsMBeanBase.java | 3 +++
.../migration/TestMigrationFrom090To092.java | 9 ++++---
.../TestMemoryBoundedLogMessageBuffer.java | 3 +++
.../hbase/monitoring/TestTaskMonitor.java | 3 +++
.../regionserver/TestAtomicOperation.java | 10 +++-----
.../hbase/regionserver/TestColumnSeeking.java | 9 +++----
.../regionserver/TestCompactSelection.java | 8 +++----
.../hbase/regionserver/TestCompaction.java | 2 ++
.../regionserver/TestCompoundBloomFilter.java | 5 ++--
.../TestExplicitColumnTracker.java | 5 ++--
.../TestGetClosestAtOrBefore.java | 8 +++----
.../hbase/regionserver/TestHRegionInfo.java | 7 +++---
.../hbase/regionserver/TestKeepDeletes.java | 8 +++----
.../hbase/regionserver/TestKeyValueHeap.java | 6 ++---
.../regionserver/TestKeyValueScanFixture.java | 5 ++--
.../regionserver/TestKeyValueSkipListSet.java | 5 +++-
.../hbase/regionserver/TestMemStore.java | 7 +++---
.../hbase/regionserver/TestMemStoreLAB.java | 3 +++
.../hbase/regionserver/TestMinVersions.java | 6 ++---
.../regionserver/TestMultiColumnScanner.java | 9 +++----
.../hbase/regionserver/TestParallelPut.java | 16 +++----------
.../hbase/regionserver/TestQueryMatcher.java | 6 ++---
.../regionserver/TestRSStatusServlet.java | 8 +++----
.../TestReadWriteConsistencyControl.java | 3 +++
.../regionserver/TestRegionSplitPolicy.java | 6 ++---
.../regionserver/TestResettingCounters.java | 8 +++----
.../regionserver/TestScanDeleteTracker.java | 6 ++---
.../TestScanWildcardColumnTracker.java | 5 ++--
.../hbase/regionserver/TestScanner.java | 10 +++-----
.../regionserver/TestSplitTransaction.java | 24 +++++++++++--------
.../hbase/regionserver/TestStoreFile.java | 7 +++---
.../hbase/regionserver/TestStoreScanner.java | 5 ++--
.../hbase/regionserver/TestWideScanner.java | 9 +++----
.../handler/TestCloseRegionHandler.java | 8 +++----
.../hbase/regionserver/wal/TestHLogBench.java | 9 +++----
.../regionserver/wal/TestHLogMethods.java | 7 +++---
.../wal/TestWALActionsListener.java | 3 +++
.../hbase/rest/model/TestCellModel.java | 3 +++
.../hbase/rest/model/TestCellSetModel.java | 3 +++
.../rest/model/TestColumnSchemaModel.java | 3 +++
.../hadoop/hbase/rest/model/TestRowModel.java | 3 +++
.../hbase/rest/model/TestScannerModel.java | 3 +++
.../model/TestStorageClusterStatusModel.java | 3 +++
.../model/TestStorageClusterVersionModel.java | 3 +++
.../hbase/rest/model/TestTableInfoModel.java | 3 +++
.../hbase/rest/model/TestTableListModel.java | 3 +++
.../rest/model/TestTableRegionModel.java | 5 ++--
.../rest/model/TestTableSchemaModel.java | 3 +++
.../hbase/rest/model/TestVersionModel.java | 3 +++
.../hadoop/hbase/security/TestUser.java | 3 +++
.../apache/hadoop/hbase/util/TestBase64.java | 3 +++
.../hbase/util/TestByteBloomFilter.java | 3 +++
.../apache/hadoop/hbase/util/TestBytes.java | 3 +++
.../hbase/util/TestCompressionTest.java | 3 +++
.../hbase/util/TestFSTableDescriptors.java | 11 ++++-----
.../hbase/util/TestHBaseFsckComparator.java | 3 +++
.../apache/hadoop/hbase/util/TestKeying.java | 5 +++-
.../apache/hadoop/hbase/util/TestPoolMap.java | 3 +++
.../hadoop/hbase/util/TestRootPath.java | 5 +++-
.../hbase/util/TestSortedCopyOnWriteSet.java | 3 +++
.../hbase/zookeeper/TestHQuorumPeer.java | 6 ++---
.../zookeeper/TestZooKeeperMainServerArg.java | 6 ++---
119 files changed, 375 insertions(+), 244 deletions(-)
diff --git a/src/test/java/org/apache/hadoop/hbase/TestCompare.java b/src/test/java/org/apache/hadoop/hbase/TestCompare.java
index 2c0d45d142c..36ad4d10a9f 100644
--- a/src/test/java/org/apache/hadoop/hbase/TestCompare.java
+++ b/src/test/java/org/apache/hadoop/hbase/TestCompare.java
@@ -21,10 +21,12 @@ package org.apache.hadoop.hbase;
import junit.framework.TestCase;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
/**
* Test comparing HBase objects.
*/
+@Category(SmallTests.class)
public class TestCompare extends TestCase {
/**
@@ -52,4 +54,4 @@ public class TestCompare extends TestCase {
b = new HRegionInfo(t.getName(), Bytes.toBytes("aaaa"), Bytes.toBytes("eeee"));
assertTrue(a.compareTo(b) < 0);
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/TestFSTableDescriptorForceCreation.java b/src/test/java/org/apache/hadoop/hbase/TestFSTableDescriptorForceCreation.java
index 84fd9516e25..fcca13ff109 100644
--- a/src/test/java/org/apache/hadoop/hbase/TestFSTableDescriptorForceCreation.java
+++ b/src/test/java/org/apache/hadoop/hbase/TestFSTableDescriptorForceCreation.java
@@ -28,7 +28,9 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.util.FSTableDescriptors;
import org.junit.*;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestFSTableDescriptorForceCreation {
private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
@@ -69,4 +71,4 @@ public class TestFSTableDescriptorForceCreation {
assertTrue("Should create new table descriptor",
FSTableDescriptors.createTableDescriptor(fs, rootdir, htd, true));
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/TestHRegionLocation.java b/src/test/java/org/apache/hadoop/hbase/TestHRegionLocation.java
index 6951a6ebf00..fc87a240cce 100644
--- a/src/test/java/org/apache/hadoop/hbase/TestHRegionLocation.java
+++ b/src/test/java/org/apache/hadoop/hbase/TestHRegionLocation.java
@@ -25,7 +25,9 @@ import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestHRegionLocation {
/**
* HRegionLocations are equal if they have the same 'location' -- i.e. host and
@@ -76,4 +78,4 @@ public class TestHRegionLocation {
int compare2 = hsl2.compareTo(hsl1);
assertTrue((compare1 > 0)? compare2 < 0: compare2 > 0);
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/TestHServerAddress.java b/src/test/java/org/apache/hadoop/hbase/TestHServerAddress.java
index 4108ba59606..7394f9415f6 100644
--- a/src/test/java/org/apache/hadoop/hbase/TestHServerAddress.java
+++ b/src/test/java/org/apache/hadoop/hbase/TestHServerAddress.java
@@ -26,10 +26,12 @@ import java.net.InetSocketAddress;
import org.apache.hadoop.hbase.util.Writables;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Tests for {@link HServerAddress}
*/
+@Category(SmallTests.class)
public class TestHServerAddress {
@Test
public void testHashCode() {
@@ -80,4 +82,4 @@ public class TestHServerAddress {
(HServerAddress)Writables.getWritable(bytes, new HServerAddress());
assertNotSame(hsa1, deserialized);
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/TestHServerInfo.java b/src/test/java/org/apache/hadoop/hbase/TestHServerInfo.java
index 39862f36224..3aad715b4c2 100644
--- a/src/test/java/org/apache/hadoop/hbase/TestHServerInfo.java
+++ b/src/test/java/org/apache/hadoop/hbase/TestHServerInfo.java
@@ -23,7 +23,9 @@ import java.io.IOException;
import org.apache.hadoop.hbase.util.Writables;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestHServerInfo {
@Test
diff --git a/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java b/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
index 110b847d0a4..2500e3708ff 100644
--- a/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
+++ b/src/test/java/org/apache/hadoop/hbase/TestKeyValue.java
@@ -31,7 +31,9 @@ import org.apache.hadoop.hbase.KeyValue.KVComparator;
import org.apache.hadoop.hbase.KeyValue.MetaComparator;
import org.apache.hadoop.hbase.KeyValue.Type;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestKeyValue extends TestCase {
private final Log LOG = LogFactory.getLog(this.getClass().getName());
diff --git a/src/test/java/org/apache/hadoop/hbase/TestSerialization.java b/src/test/java/org/apache/hadoop/hbase/TestSerialization.java
index 75027d512ce..ec7f2dbcc47 100644
--- a/src/test/java/org/apache/hadoop/hbase/TestSerialization.java
+++ b/src/test/java/org/apache/hadoop/hbase/TestSerialization.java
@@ -47,10 +47,12 @@ import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.Writables;
import org.apache.hadoop.io.DataInputBuffer;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Test HBase Writables serializations
*/
+@Category(SmallTests.class)
public class TestSerialization {
@Test public void testCompareFilter() throws Exception {
@@ -84,6 +86,7 @@ public class TestSerialization {
assertTrue(Bytes.equals("value".getBytes(), hmw.get("key".getBytes())));
}
+
@Test public void testTableDescriptor() throws Exception {
final String name = "testTableDescriptor";
HTableDescriptor htd = createTableDescriptor(name);
diff --git a/src/test/java/org/apache/hadoop/hbase/avro/TestAvroUtil.java b/src/test/java/org/apache/hadoop/hbase/avro/TestAvroUtil.java
index 1e4d31034b8..a7e3bffdbd5 100644
--- a/src/test/java/org/apache/hadoop/hbase/avro/TestAvroUtil.java
+++ b/src/test/java/org/apache/hadoop/hbase/avro/TestAvroUtil.java
@@ -18,12 +18,15 @@
package org.apache.hadoop.hbase.avro;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.avro.generated.AResult;
import org.apache.hadoop.hbase.client.Result;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
+@Category(SmallTests.class)
public class TestAvroUtil {
diff --git a/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java b/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java
index 20a70f1c94d..20583976d8b 100644
--- a/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java
+++ b/src/test/java/org/apache/hadoop/hbase/client/HConnectionTestingUtility.java
@@ -18,14 +18,17 @@
package org.apache.hadoop.hbase.client;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.ZooKeeperConnectionException;
import org.apache.hadoop.hbase.client.HConnectionManager.HConnectionImplementation;
import org.apache.hadoop.hbase.client.HConnectionManager.HConnectionKey;
+import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
/**
* {@link HConnection} testing utility.
*/
+@Category(SmallTests.class)
public class HConnectionTestingUtility {
/*
* Not part of {@link HBaseTestingUtility} because this class is not
diff --git a/src/test/java/org/apache/hadoop/hbase/client/TestAttributes.java b/src/test/java/org/apache/hadoop/hbase/client/TestAttributes.java
index 7e669564adc..0ee6ad72539 100644
--- a/src/test/java/org/apache/hadoop/hbase/client/TestAttributes.java
+++ b/src/test/java/org/apache/hadoop/hbase/client/TestAttributes.java
@@ -28,10 +28,13 @@ import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Arrays;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestAttributes {
@Test
public void testAttributesSerialization() throws IOException {
diff --git a/src/test/java/org/apache/hadoop/hbase/client/TestGet.java b/src/test/java/org/apache/hadoop/hbase/client/TestGet.java
index 89ecfdc8c73..bea5bc9513a 100644
--- a/src/test/java/org/apache/hadoop/hbase/client/TestGet.java
+++ b/src/test/java/org/apache/hadoop/hbase/client/TestGet.java
@@ -28,11 +28,14 @@ import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Arrays;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
// TODO: cover more test cases
+@Category(SmallTests.class)
public class TestGet {
@Test
public void testAttributesSerialization() throws IOException {
diff --git a/src/test/java/org/apache/hadoop/hbase/client/TestOperation.java b/src/test/java/org/apache/hadoop/hbase/client/TestOperation.java
index 9fd0274570a..8e658bcbe99 100644
--- a/src/test/java/org/apache/hadoop/hbase/client/TestOperation.java
+++ b/src/test/java/org/apache/hadoop/hbase/client/TestOperation.java
@@ -21,6 +21,8 @@ package org.apache.hadoop.hbase.client;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
+
+import org.apache.hadoop.hbase.SmallTests;
import org.junit.Test;
import java.io.IOException;
@@ -31,11 +33,13 @@ import java.util.Map;
import org.apache.hadoop.hbase.util.Bytes;
import org.codehaus.jackson.map.ObjectMapper;
+import org.junit.experimental.categories.Category;
/**
- * Run tests that use the funtionality of the Operation superclass for
+ * Run tests that use the functionality of the Operation superclass for
* Puts, Gets, Deletes, Scans, and MultiPuts.
*/
+@Category(SmallTests.class)
public class TestOperation {
private static byte [] ROW = Bytes.toBytes("testRow");
private static byte [] FAMILY = Bytes.toBytes("testFamily");
diff --git a/src/test/java/org/apache/hadoop/hbase/client/TestResult.java b/src/test/java/org/apache/hadoop/hbase/client/TestResult.java
index becabcfb469..ae8cf329900 100644
--- a/src/test/java/org/apache/hadoop/hbase/client/TestResult.java
+++ b/src/test/java/org/apache/hadoop/hbase/client/TestResult.java
@@ -22,7 +22,9 @@ package org.apache.hadoop.hbase.client;
import junit.framework.TestCase;
import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
import static org.apache.hadoop.hbase.HBaseTestCase.assertByteEquals;
@@ -31,6 +33,7 @@ import java.util.List;
import java.util.Map;
import java.util.NavigableMap;
+@Category(SmallTests.class)
public class TestResult extends TestCase {
static KeyValue[] genKVs(final byte[] row, final byte[] family,
diff --git a/src/test/java/org/apache/hadoop/hbase/client/TestScan.java b/src/test/java/org/apache/hadoop/hbase/client/TestScan.java
index 35c30528f59..d6443254e95 100644
--- a/src/test/java/org/apache/hadoop/hbase/client/TestScan.java
+++ b/src/test/java/org/apache/hadoop/hbase/client/TestScan.java
@@ -28,11 +28,14 @@ import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Arrays;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Assert;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
// TODO: cover more test cases
+@Category(SmallTests.class)
public class TestScan {
@Test
public void testAttributesSerialization() throws IOException {
diff --git a/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java b/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
index fbfdd839cef..e45ad85a65d 100644
--- a/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
+++ b/src/test/java/org/apache/hadoop/hbase/coprocessor/TestCoprocessorInterface.java
@@ -28,13 +28,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.CoprocessorEnvironment;
-import org.apache.hadoop.hbase.Coprocessor;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.regionserver.InternalScanner;
import org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost;
@@ -45,11 +39,12 @@ import org.apache.hadoop.hbase.regionserver.Store;
import org.apache.hadoop.hbase.regionserver.StoreFile;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.PairOfSameType;
-import org.apache.hadoop.hbase.Server;
+import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
+
import static org.mockito.Mockito.when;
+@Category(SmallTests.class)
public class TestCoprocessorInterface extends HBaseTestCase {
static final Log LOG = LogFactory.getLog(TestCoprocessorInterface.class);
static final String DIR = "test/build/data/TestCoprocessorInterface/";
diff --git a/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverStacking.java b/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverStacking.java
index 96429c7abbb..03b42639fe4 100644
--- a/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverStacking.java
+++ b/src/test/java/org/apache/hadoop/hbase/coprocessor/TestRegionObserverStacking.java
@@ -26,12 +26,7 @@ import java.util.Map;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.Coprocessor;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.regionserver.RegionCoprocessorHost;
import org.apache.hadoop.hbase.regionserver.wal.WALEdit;
@@ -39,7 +34,9 @@ import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestRegionObserverStacking extends TestCase {
static final String DIR = "test/build/data/TestRegionObserverStacking/";
diff --git a/src/test/java/org/apache/hadoop/hbase/executor/TestExecutorService.java b/src/test/java/org/apache/hadoop/hbase/executor/TestExecutorService.java
index cb10fff74f7..24fb13f757b 100644
--- a/src/test/java/org/apache/hadoop/hbase/executor/TestExecutorService.java
+++ b/src/test/java/org/apache/hadoop/hbase/executor/TestExecutorService.java
@@ -31,15 +31,17 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.Server;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.executor.EventHandler.EventType;
import org.apache.hadoop.hbase.executor.ExecutorService.Executor;
import org.apache.hadoop.hbase.executor.ExecutorService.ExecutorStatus;
import org.apache.hadoop.hbase.executor.ExecutorService.ExecutorType;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import static org.mockito.Mockito.*;
+@Category(SmallTests.class)
public class TestExecutorService {
private static final Log LOG = LogFactory.getLog(TestExecutorService.class);
@@ -172,4 +174,4 @@ public class TestExecutorService {
counter.incrementAndGet();
}
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestBitComparator.java b/src/test/java/org/apache/hadoop/hbase/filter/TestBitComparator.java
index 5a08f1b912c..7b0f0becc8d 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestBitComparator.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestBitComparator.java
@@ -17,10 +17,13 @@
package org.apache.hadoop.hbase.filter;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
/**
* Tests for the bit comparator
*/
+@Category(SmallTests.class)
public class TestBitComparator extends TestCase {
private static byte[] zeros = new byte[]{0, 0, 0, 0, 0, 0};
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPaginationFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPaginationFilter.java
index 2c8af2a3113..64a7f3f8404 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPaginationFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPaginationFilter.java
@@ -25,14 +25,17 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
/**
* Test for the ColumnPaginationFilter, used mainly to test the successful serialization of the filter.
* More test functionality can be found within {@link org.apache.hadoop.hbase.filter.TestFilter#testColumnPaginationFilter()}
*/
+@Category(SmallTests.class)
public class TestColumnPaginationFilter extends TestCase
{
private static final byte[] ROW = Bytes.toBytes("row_1_test");
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
index 7d2b300e2d6..a081b6de0f8 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestColumnPrefixFilter.java
@@ -27,19 +27,16 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.KeyValueTestUtil;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.regionserver.InternalScanner;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestColumnPrefixFilter {
private final static HBaseTestingUtility TEST_UTIL = new
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
index 954be6b6ff0..59cb5fadf4d 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestDependentColumnFilter.java
@@ -27,11 +27,7 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
@@ -41,7 +37,9 @@ import org.apache.hadoop.hbase.regionserver.InternalScanner;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestDependentColumnFilter extends TestCase {
private final Log LOG = LogFactory.getLog(this.getClass());
private static final byte[][] ROWS = {
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
index 2c513d588a5..a2ef1b5c4a7 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestFilter.java
@@ -29,12 +29,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import junit.framework.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Scan;
@@ -43,10 +38,12 @@ import org.apache.hadoop.hbase.filter.FilterList.Operator;
import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.regionserver.InternalScanner;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
/**
* Test filters at the HRegion doorstep.
*/
+@Category(SmallTests.class)
public class TestFilter extends HBaseTestCase {
private final Log LOG = LogFactory.getLog(this.getClass());
private HRegion region;
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java b/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
index 89a1093c6fc..a251d48344e 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestFilterList.java
@@ -33,13 +33,16 @@ import java.util.List;
import junit.framework.TestCase;
import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.filter.FilterList.Operator;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
/**
* Tests filter sets
*
*/
+@Category(SmallTests.class)
public class TestFilterList extends TestCase {
static final int MAX_PAGES = 2;
static final char FIRST_CHAR = 'a';
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestInclusiveStopFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestInclusiveStopFilter.java
index 92f6eafb77b..595a90e1391 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestInclusiveStopFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestInclusiveStopFilter.java
@@ -24,13 +24,16 @@ import java.io.ByteArrayOutputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
/**
* Tests the inclusive stop row filter
*/
+@Category(SmallTests.class)
public class TestInclusiveStopFilter extends TestCase {
private final byte [] STOP_ROW = Bytes.toBytes("stop_row");
private final byte [] GOOD_ROW = Bytes.toBytes("good_row");
@@ -86,4 +89,4 @@ public class TestInclusiveStopFilter extends TestCase {
assertFalse("Filter a null", filter.filterRowKey(null, 0, 0));
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java
index 424dfb027f3..9c39e3225ca 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestMultipleColumnPrefixFilter.java
@@ -27,19 +27,16 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.KeyValueTestUtil;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.regionserver.InternalScanner;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestMultipleColumnPrefixFilter {
private final static HBaseTestingUtility TEST_UTIL = new
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestPageFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestPageFilter.java
index f47ba902219..8780caa5aef 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestPageFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestPageFilter.java
@@ -25,10 +25,13 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
/**
* Tests for the page filter
*/
+@Category(SmallTests.class)
public class TestPageFilter extends TestCase {
static final int ROW_LIMIT = 3;
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestParseFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestParseFilter.java
index 76b92b80971..2db9555f35f 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestParseFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestParseFilter.java
@@ -31,12 +31,7 @@ import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.KeyValueTestUtil;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.regionserver.HRegion;
@@ -45,12 +40,14 @@ import org.apache.hadoop.hbase.util.Bytes;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* This class tests ParseFilter.java
* It tests the entire work flow from when a string is given by the user
* and how it is parsed to construct the corresponding Filter object
*/
+@Category(SmallTests.class)
public class TestParseFilter {
ParseFilter f;
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestPrefixFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestPrefixFilter.java
index 50a7d6fc7a5..0d78f478427 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestPrefixFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestPrefixFilter.java
@@ -22,7 +22,9 @@ package org.apache.hadoop.hbase.filter;
import junit.framework.TestCase;
import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -30,6 +32,7 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.UnsupportedEncodingException;
+@Category(SmallTests.class)
public class TestPrefixFilter extends TestCase {
Filter mainFilter;
static final char FIRST_CHAR = 'a';
@@ -97,4 +100,4 @@ public class TestPrefixFilter extends TestCase {
private byte [] createRow(final char c) {
return Bytes.toBytes(HOST_PREFIX + Character.toString(c));
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestRandomRowFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestRandomRowFilter.java
index c36e21c7578..74c264c07e4 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestRandomRowFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestRandomRowFilter.java
@@ -27,8 +27,11 @@ import java.io.DataOutputStream;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestRandomRowFilter extends TestCase {
protected RandomRowFilter quarterChanceFilter;
@@ -88,4 +91,4 @@ public class TestRandomRowFilter extends TestCase {
return newFilter;
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
index 4a1b5769881..d16ac4008ff 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueExcludeFilter.java
@@ -22,8 +22,10 @@ package org.apache.hadoop.hbase.filter;
import junit.framework.TestCase;
import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
/**
* Tests for {@link SingleColumnValueExcludeFilter}. Because this filter
@@ -33,6 +35,7 @@ import org.apache.hadoop.hbase.util.Bytes;
* @author ferdy
*
*/
+@Category(SmallTests.class)
public class TestSingleColumnValueExcludeFilter extends TestCase {
private static final byte[] ROW = Bytes.toBytes("test");
private static final byte[] COLUMN_FAMILY = Bytes.toBytes("test");
diff --git a/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueFilter.java b/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueFilter.java
index 677a6250431..bfafb33b997 100644
--- a/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/filter/TestSingleColumnValueFilter.java
@@ -25,14 +25,17 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
/**
* Tests the value filter
*/
+@Category(SmallTests.class)
public class TestSingleColumnValueFilter extends TestCase {
private static final byte[] ROW = Bytes.toBytes("test");
private static final byte[] COLUMN_FAMILY = Bytes.toBytes("test");
diff --git a/src/test/java/org/apache/hadoop/hbase/io/TestHalfStoreFileReader.java b/src/test/java/org/apache/hadoop/hbase/io/TestHalfStoreFileReader.java
index c803a4db3f4..1d367083322 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/TestHalfStoreFileReader.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/TestHalfStoreFileReader.java
@@ -29,15 +29,15 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
import org.apache.hadoop.hbase.io.hfile.HFile;
import org.apache.hadoop.hbase.io.hfile.HFileScanner;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
-
+@Category(SmallTests.class)
public class TestHalfStoreFileReader {
/**
diff --git a/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java b/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
index d9ff5d3678a..3806108e9ad 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/TestHbaseObjectWritable.java
@@ -26,8 +26,7 @@ import java.util.List;
import junit.framework.TestCase;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.filter.Filter;
import org.apache.hadoop.hbase.filter.FilterBase;
import org.apache.hadoop.hbase.filter.FilterList;
@@ -37,7 +36,9 @@ import org.apache.hadoop.io.Text;
import org.apache.hadoop.io.Writable;
import org.apache.hadoop.io.WritableComparator;
import org.junit.Assert;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestHbaseObjectWritable extends TestCase {
@Override
diff --git a/src/test/java/org/apache/hadoop/hbase/io/TestHeapSize.java b/src/test/java/org/apache/hadoop/hbase/io/TestHeapSize.java
index 96e21930aeb..c48f0993dfc 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/TestHeapSize.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/TestHeapSize.java
@@ -38,6 +38,7 @@ import junit.framework.TestCase;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.io.hfile.CachedBlock;
import org.apache.hadoop.hbase.io.hfile.LruBlockCache;
@@ -46,11 +47,13 @@ import org.apache.hadoop.hbase.regionserver.MemStore;
import org.apache.hadoop.hbase.regionserver.Store;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.ClassSize;
+import org.junit.experimental.categories.Category;
/**
* Testing the sizing that HeapSize offers and compares to the size given by
* ClassSize.
*/
+@Category(SmallTests.class)
public class TestHeapSize extends TestCase {
static final Log LOG = LogFactory.getLog(TestHeapSize.class);
// List of classes implementing HeapSize
diff --git a/src/test/java/org/apache/hadoop/hbase/io/TestImmutableBytesWritable.java b/src/test/java/org/apache/hadoop/hbase/io/TestImmutableBytesWritable.java
index 77c4506ec81..4279dace75b 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/TestImmutableBytesWritable.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/TestImmutableBytesWritable.java
@@ -22,11 +22,15 @@ package org.apache.hadoop.hbase.io;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
+
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;
+@Category(SmallTests.class)
public class TestImmutableBytesWritable extends TestCase {
public void testHash() throws Exception {
assertEquals(
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheColumnFamilySummary.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheColumnFamilySummary.java
index cc4abc62f37..58f3d01788b 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheColumnFamilySummary.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestBlockCacheColumnFamilySummary.java
@@ -26,12 +26,15 @@ import static org.junit.Assert.assertTrue;
import java.util.HashMap;
import java.util.Map;
+import org.apache.hadoop.hbase.SmallTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Tests the BlockCacheColumnFamilySummary class
*
*/
+@Category(SmallTests.class)
public class TestBlockCacheColumnFamilySummary {
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCachedBlockQueue.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCachedBlockQueue.java
index def9c47c3a6..b8d585c3ce7 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCachedBlockQueue.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestCachedBlockQueue.java
@@ -24,7 +24,10 @@ import java.nio.ByteBuffer;
import java.util.LinkedList;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestCachedBlockQueue extends TestCase {
public void testQueue() throws Exception {
@@ -154,4 +157,4 @@ public class TestCachedBlockQueue extends TestCase {
accessTime,false);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestFixedFileTrailer.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestFixedFileTrailer.java
index a821ec733b1..9847af465c0 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestFixedFileTrailer.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestFixedFileTrailer.java
@@ -46,6 +46,7 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
@RunWith(Parameterized.class)
+@Category(MediumTests.class)
public class TestFixedFileTrailer {
private static final Log LOG = LogFactory.getLog(TestFixedFileTrailer.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java
index 16ee82a0222..93f47d1d7f4 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java
@@ -46,6 +46,7 @@ import org.junit.experimental.categories.Category;
* Remove after tfile is committed and use the tfile version of this class
* instead.
*/
+@Category(SmallTests.class)
public class TestHFile extends HBaseTestCase {
static final Log LOG = LogFactory.getLog(TestHFile.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java
index 58b66efcc2c..7e88f1c5f44 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlockIndex.java
@@ -55,6 +55,7 @@ import org.junit.runners.Parameterized.Parameters;
import static org.junit.Assert.*;
@RunWith(Parameterized.class)
+@Category(MediumTests.class)
public class TestHFileBlockIndex {
@Parameters
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFilePerformance.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFilePerformance.java
index 019cd991682..c2b08e5a711 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFilePerformance.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFilePerformance.java
@@ -46,6 +46,7 @@ import org.junit.experimental.categories.Category;
* Remove after tfile is committed and use the tfile version of this class
* instead.
*/
+@Category(MediumTests.class)
public class TestHFilePerformance extends TestCase {
private static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static String ROOT_DIR =
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileReaderV1.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileReaderV1.java
index 3920b320814..32ef6771982 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileReaderV1.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileReaderV1.java
@@ -27,13 +27,16 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseTestingUtility;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import static org.junit.Assert.*;
+@Category(SmallTests.class)
public class TestHFileReaderV1 {
private static final HBaseTestingUtility TEST_UTIL =
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileSeek.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileSeek.java
index ecb1cc09a46..8b9bdd34e1e 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileSeek.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileSeek.java
@@ -39,9 +39,11 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.fs.RawLocalFileSystem;
import org.apache.hadoop.hbase.HBaseTestingUtility;
+import org.apache.hadoop.hbase.MediumTests;
import org.apache.hadoop.hbase.io.hfile.HFile.Reader;
import org.apache.hadoop.hbase.io.hfile.HFile.Writer;
import org.apache.hadoop.io.BytesWritable;
+import org.junit.experimental.categories.Category;
import org.mortbay.log.Log;
/**
@@ -52,6 +54,7 @@ import org.mortbay.log.Log;
* Remove after tfile is committed and use the tfile version of this class
* instead.
*/
+@Category(MediumTests.class)
public class TestHFileSeek extends TestCase {
private static final boolean USE_PREAD = true;
private MyOptions options;
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileWriterV2.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileWriterV2.java
index 63ed4c5db55..b144ce8dd5e 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileWriterV2.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileWriterV2.java
@@ -34,17 +34,18 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FSDataInputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.io.Text;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Testing writing a version 2 {@link HFile}. This is a low-level test written
* during the development of {@link HFileWriterV2}.
*/
+@Category(SmallTests.class)
public class TestHFileWriterV2 {
private static final Log LOG = LogFactory.getLog(TestHFileWriterV2.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestReseekTo.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestReseekTo.java
index f2f32bb2c27..b9a25157b53 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestReseekTo.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestReseekTo.java
@@ -25,14 +25,17 @@ import java.util.List;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.HBaseTestingUtility;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import static org.junit.Assert.*;
/**
* Test {@link HFileScanner#reseekTo(byte[])}
*/
+@Category(SmallTests.class)
public class TestReseekTo {
private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
@@ -86,4 +89,4 @@ public class TestReseekTo {
}
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestSeekTo.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestSeekTo.java
index 3df1f212859..ee94917880a 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestSeekTo.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestSeekTo.java
@@ -23,13 +23,14 @@ import java.io.IOException;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
/**
* Test {@link HFileScanner#seekTo(byte[])} and its variants.
*/
+@Category(SmallTests.class)
public class TestSeekTo extends HBaseTestCase {
static KeyValue toKV(String row) {
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSingleSizeCache.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSingleSizeCache.java
index 8b1c2c237a5..bd6cb607a55 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSingleSizeCache.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSingleSizeCache.java
@@ -33,6 +33,7 @@ import org.junit.experimental.categories.Category;
* Tests will ensure that evictions operate when they're supposed to and do what
* they should, and that cached blocks are accessible when expected to be.
*/
+// Starts 100 threads, high variability of execution time => Medium
@Category(MediumTests.class)
public class TestSingleSizeCache {
SingleSizeCache cache;
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSlab.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSlab.java
index 8d094937d38..dc90bc0e82e 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSlab.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSlab.java
@@ -22,9 +22,13 @@ package org.apache.hadoop.hbase.io.hfile.slab;
import static org.junit.Assert.*;
import java.nio.ByteBuffer;
+
+import org.apache.hadoop.hbase.SmallTests;
import org.junit.*;
+import org.junit.experimental.categories.Category;
/**Test cases for Slab.java*/
+@Category(SmallTests.class)
public class TestSlab {
static final int BLOCKSIZE = 1000;
static final int NUMBLOCKS = 100;
diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSlabCache.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSlabCache.java
index 64329c52ea3..c15d64710d7 100644
--- a/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSlabCache.java
+++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/slab/TestSlabCache.java
@@ -23,12 +23,14 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.MediumTests;
import org.apache.hadoop.hbase.io.hfile.CacheTestUtils;
import org.apache.hadoop.hbase.io.hfile.slab.SlabCache.SlabStats;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
/**
* Basic test of SlabCache. Puts and gets.
@@ -40,6 +42,8 @@ import org.junit.Ignore;
* choose to evict at any time.
*
*/
+// Starts 50 threads, high variability of execution time => Medium
+@Category(MediumTests.class)
public class TestSlabCache {
static final int CACHE_SIZE = 1000000;
static final int NUM_BLOCKS = 101;
diff --git a/src/test/java/org/apache/hadoop/hbase/ipc/TestDelayedRpc.java b/src/test/java/org/apache/hadoop/hbase/ipc/TestDelayedRpc.java
index 4902ed55167..56a4e894161 100644
--- a/src/test/java/org/apache/hadoop/hbase/ipc/TestDelayedRpc.java
+++ b/src/test/java/org/apache/hadoop/hbase/ipc/TestDelayedRpc.java
@@ -32,17 +32,20 @@ import java.util.List;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.ipc.VersionedProtocol;
import org.apache.log4j.AppenderSkeleton;
import org.apache.log4j.Logger;
import org.apache.log4j.spi.LoggingEvent;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Test that delayed RPCs work. Fire up three calls, the first of which should
* be delayed. Check that the last two, which are undelayed, return before the
* first one.
*/
+@Category(SmallTests.class)
public class TestDelayedRpc {
public static RpcServer rpcServer;
diff --git a/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSimpleTotalOrderPartitioner.java b/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSimpleTotalOrderPartitioner.java
index a69600e3753..3c456f06dee 100644
--- a/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSimpleTotalOrderPartitioner.java
+++ b/src/test/java/org/apache/hadoop/hbase/mapreduce/TestSimpleTotalOrderPartitioner.java
@@ -19,14 +19,15 @@
*/
package org.apache.hadoop.hbase.mapreduce;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
/**
* Test of simple partitioner.
*/
+@Category(SmallTests.class)
public class TestSimpleTotalOrderPartitioner extends HBaseTestCase {
public void testSplit() throws Exception {
String start = "a";
diff --git a/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSplit.java b/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSplit.java
index 4bad863ce2f..d8298822f4b 100644
--- a/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSplit.java
+++ b/src/test/java/org/apache/hadoop/hbase/mapreduce/TestTableSplit.java
@@ -17,13 +17,16 @@
*/
package org.apache.hadoop.hbase.mapreduce;
+import org.apache.hadoop.hbase.SmallTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.util.HashSet;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
+@Category(SmallTests.class)
public class TestTableSplit {
@Test
public void testHashCode() {
diff --git a/src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java b/src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java
index 41d9e610a39..ee769bcbc33 100644
--- a/src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java
+++ b/src/test/java/org/apache/hadoop/hbase/master/TestCatalogJanitor.java
@@ -35,17 +35,7 @@ import java.util.TreeMap;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.NotAllMetaRegionsOnlineException;
-import org.apache.hadoop.hbase.Server;
-import org.apache.hadoop.hbase.ServerName;
-import org.apache.hadoop.hbase.TableDescriptors;
-import org.apache.hadoop.hbase.TableExistsException;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.catalog.CatalogTracker;
import org.apache.hadoop.hbase.client.HConnection;
import org.apache.hadoop.hbase.client.HConnectionManager;
@@ -59,8 +49,10 @@ import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.Writables;
import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
+@Category(SmallTests.class)
public class TestCatalogJanitor {
/**
* Pseudo server for below tests.
diff --git a/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java b/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java
index ac54dd09bf9..f9d26b9f388 100644
--- a/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java
+++ b/src/test/java/org/apache/hadoop/hbase/master/TestClockSkewDetection.java
@@ -26,15 +26,13 @@ import junit.framework.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.ClockOutOfSyncException;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.Server;
-import org.apache.hadoop.hbase.ServerName;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.catalog.CatalogTracker;
import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
-
+@Category(MediumTests.class)
public class TestClockSkewDetection {
private static final Log LOG =
LogFactory.getLog(TestClockSkewDetection.class);
@@ -97,4 +95,4 @@ public class TestClockSkewDetection {
LOG.info("Recieved expected exception: "+e);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/master/TestDeadServer.java b/src/test/java/org/apache/hadoop/hbase/master/TestDeadServer.java
index 76a8a85c53c..1392ead9178 100644
--- a/src/test/java/org/apache/hadoop/hbase/master/TestDeadServer.java
+++ b/src/test/java/org/apache/hadoop/hbase/master/TestDeadServer.java
@@ -20,10 +20,12 @@ package org.apache.hadoop.hbase.master;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
+import org.apache.hadoop.hbase.MediumTests;
import org.apache.hadoop.hbase.ServerName;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
-
+@Category(MediumTests.class)
public class TestDeadServer {
@Test public void testIsDead() {
DeadServer ds = new DeadServer();
@@ -56,4 +58,4 @@ public class TestDeadServer {
assertFalse(ds.isDeadServer(deadServer));
assertFalse(ds.cleanPreviousInstance(deadServerHostComingAlive));
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/master/TestDefaultLoadBalancer.java b/src/test/java/org/apache/hadoop/hbase/master/TestDefaultLoadBalancer.java
index 2b2c7e1b959..65969da1403 100644
--- a/src/test/java/org/apache/hadoop/hbase/master/TestDefaultLoadBalancer.java
+++ b/src/test/java/org/apache/hadoop/hbase/master/TestDefaultLoadBalancer.java
@@ -37,17 +37,17 @@ import java.util.TreeSet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.ServerName;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Test the load balancer that is created by default.
*/
+@Category(MediumTests.class)
public class TestDefaultLoadBalancer {
private static final Log LOG = LogFactory.getLog(TestDefaultLoadBalancer.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java b/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
index 5ceaac8880e..90bfd3413fa 100644
--- a/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
+++ b/src/test/java/org/apache/hadoop/hbase/master/TestMasterStatusServlet.java
@@ -43,6 +43,7 @@ import org.apache.hbase.tmpl.master.AssignmentManagerStatusTmpl;
import org.apache.hbase.tmpl.master.MasterStatusTmpl;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
import com.google.common.collect.Lists;
@@ -51,6 +52,7 @@ import com.google.common.collect.Maps;
/**
* Tests for the master status page and its template.
*/
+@Category(MediumTests.class)
public class TestMasterStatusServlet {
private HMaster master;
diff --git a/src/test/java/org/apache/hadoop/hbase/metrics/TestMetricsMBeanBase.java b/src/test/java/org/apache/hadoop/hbase/metrics/TestMetricsMBeanBase.java
index 74a03382c66..efc688ab69d 100644
--- a/src/test/java/org/apache/hadoop/hbase/metrics/TestMetricsMBeanBase.java
+++ b/src/test/java/org/apache/hadoop/hbase/metrics/TestMetricsMBeanBase.java
@@ -27,6 +27,7 @@ import java.util.Map;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanInfo;
+import org.apache.hadoop.hbase.MediumTests;
import org.apache.hadoop.metrics.MetricsContext;
import org.apache.hadoop.metrics.MetricsRecord;
import org.apache.hadoop.metrics.MetricsUtil;
@@ -35,7 +36,9 @@ import org.apache.hadoop.metrics.util.MetricsRegistry;
import org.apache.hadoop.metrics.util.MetricsTimeVaryingRate;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(MediumTests.class)
public class TestMetricsMBeanBase extends TestCase {
private class TestStatistics extends MetricsMBeanBase {
diff --git a/src/test/java/org/apache/hadoop/hbase/migration/TestMigrationFrom090To092.java b/src/test/java/org/apache/hadoop/hbase/migration/TestMigrationFrom090To092.java
index 6a6022701d4..19ed74b9191 100644
--- a/src/test/java/org/apache/hadoop/hbase/migration/TestMigrationFrom090To092.java
+++ b/src/test/java/org/apache/hadoop/hbase/migration/TestMigrationFrom090To092.java
@@ -22,18 +22,17 @@ import java.io.IOException;
import junit.framework.Assert;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.catalog.MetaMigrationRemovingHTD;
import org.apache.hadoop.hbase.util.Writables;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Migration tests that do not need spin up of a cluster.
* @deprecated Remove after we release 0.92
*/
+@Category(SmallTests.class)
public class TestMigrationFrom090To092 {
@Test
public void testMigrateHRegionInfoFromVersion0toVersion1()
@@ -55,4 +54,4 @@ public class TestMigrationFrom090To092 {
htd.addFamily(new HColumnDescriptor("family"));
return htd;
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java b/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java
index 22cd0285daf..8f23441ba42 100644
--- a/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java
+++ b/src/test/java/org/apache/hadoop/hbase/monitoring/TestMemoryBoundedLogMessageBuffer.java
@@ -24,13 +24,16 @@ import static org.junit.Assert.*;
import java.io.PrintWriter;
import java.io.StringWriter;
+import org.apache.hadoop.hbase.MediumTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Test case for the MemoryBoundedLogMessageBuffer utility.
* Ensures that it uses no more memory than it's supposed to,
* and that it properly deals with multibyte encodings.
*/
+@Category(MediumTests.class)
public class TestMemoryBoundedLogMessageBuffer {
private static final long TEN_KB = 10 * 1024;
diff --git a/src/test/java/org/apache/hadoop/hbase/monitoring/TestTaskMonitor.java b/src/test/java/org/apache/hadoop/hbase/monitoring/TestTaskMonitor.java
index 3766898344f..076c3dec51c 100644
--- a/src/test/java/org/apache/hadoop/hbase/monitoring/TestTaskMonitor.java
+++ b/src/test/java/org/apache/hadoop/hbase/monitoring/TestTaskMonitor.java
@@ -23,8 +23,11 @@ import static org.junit.Assert.*;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.apache.hadoop.hbase.MediumTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(MediumTests.class)
public class TestTaskMonitor {
@Test
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
index a5b361eafc9..f8eb06ab2d0 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
@@ -24,25 +24,21 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Append;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.EnvironmentEdgeManagerTestHelper;
+import org.junit.experimental.categories.Category;
/**
* Testing of HRegion.incrementColumnValue, HRegion.increment,
* and HRegion.append
*/
+@Category(MediumTests.class) // Starts 100 threads
public class TestAtomicOperation extends HBaseTestCase {
static final Log LOG = LogFactory.getLog(TestAtomicOperation.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestColumnSeeking.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestColumnSeeking.java
index d2945fa8d5a..592bbcc0dd1 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestColumnSeeking.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestColumnSeeking.java
@@ -32,17 +32,14 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.KeyValueTestUtil;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestColumnSeeking {
private final static HBaseTestingUtility TEST_UTIL =
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactSelection.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactSelection.java
index 7882fe94be5..a528eb4a460 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactSelection.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompactSelection.java
@@ -31,17 +31,15 @@ import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
import org.apache.hadoop.hbase.regionserver.wal.HLog;
import org.apache.hadoop.hbase.util.Bytes;
import com.google.common.collect.Lists;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestCompactSelection extends TestCase {
private final static Log LOG = LogFactory.getLog(TestCompactSelection.class);
private final static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
index 35b8a6c8547..fc51b3d7ba5 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompaction.java
@@ -47,6 +47,7 @@ import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.junit.AfterClass;
import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
@@ -54,6 +55,7 @@ import org.mockito.stubbing.Answer;
/**
* Test compactions
*/
+@Category(SmallTests.class)
public class TestCompaction extends HBaseTestCase {
static final Log LOG = LogFactory.getLog(TestCompaction.class.getName());
private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompoundBloomFilter.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompoundBloomFilter.java
index d5c9545414d..b6a060da725 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompoundBloomFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestCompoundBloomFilter.java
@@ -37,8 +37,7 @@ import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.io.hfile.BlockCache;
import org.apache.hadoop.hbase.io.hfile.CacheConfig;
@@ -53,11 +52,13 @@ import org.apache.hadoop.hbase.util.CompoundBloomFilterBase;
import org.apache.hadoop.hbase.util.CompoundBloomFilterWriter;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Tests writing Bloom filter blocks in the same part of the file as data
* blocks.
*/
+@Category(SmallTests.class)
public class TestCompoundBloomFilter {
private static final HBaseTestingUtility TEST_UTIL =
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestExplicitColumnTracker.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestExplicitColumnTracker.java
index 17d74c00568..e95044f3070 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestExplicitColumnTracker.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestExplicitColumnTracker.java
@@ -26,12 +26,13 @@ import java.util.List;
import java.util.TreeSet;
import java.util.Arrays;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.regionserver.ScanQueryMatcher.MatchCode;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestExplicitColumnTracker extends HBaseTestCase {
private boolean PRINT = false;
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestGetClosestAtOrBefore.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestGetClosestAtOrBefore.java
index 0f198152522..49bfc5a0a97 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestGetClosestAtOrBefore.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestGetClosestAtOrBefore.java
@@ -27,11 +27,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
@@ -39,11 +35,13 @@ import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.Writables;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.junit.experimental.categories.Category;
/**
* {@link TestGet} is a medley of tests of get all done up as a single test.
* This class
*/
+@Category(SmallTests.class)
public class TestGetClosestAtOrBefore extends HBaseTestCase {
private static final Log LOG = LogFactory.getLog(TestGetClosestAtOrBefore.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
index 9c9b0805cd9..477e77237a8 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionInfo.java
@@ -27,16 +27,15 @@ import static org.junit.Assert.fail;
import java.io.IOException;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.FSTableDescriptors;
import org.apache.hadoop.hbase.util.FSUtils;
import org.apache.hadoop.hbase.util.MD5Hash;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestHRegionInfo {
@Test
public void testCreateHRegionInfoName() throws Exception {
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
index a682fa81b28..0bd0f1f42d4 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeepDeletes.java
@@ -21,18 +21,16 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import org.apache.hadoop.hbase.DoNotRetryIOException;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestKeepDeletes extends HBaseTestCase {
private final byte[] T0 = Bytes.toBytes("0");
private final byte[] T1 = Bytes.toBytes("1");
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueHeap.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueHeap.java
index 6a2396d9016..718f53e1979 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueHeap.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueHeap.java
@@ -26,12 +26,12 @@ import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.CollectionBackedScanner;
+import org.junit.experimental.categories.Category;
-
+@Category(SmallTests.class)
public class TestKeyValueHeap extends HBaseTestCase {
private static final boolean PRINT = false;
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueScanFixture.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueScanFixture.java
index b4f836034fe..a8a7b2c5c54 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueScanFixture.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueScanFixture.java
@@ -23,10 +23,11 @@ package org.apache.hadoop.hbase.regionserver;
import java.io.IOException;
import junit.framework.TestCase;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.KeyValueTestUtil;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestKeyValueScanFixture extends TestCase {
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueSkipListSet.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueSkipListSet.java
index 0264e029c1d..baf1c7e62f7 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueSkipListSet.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestKeyValueSkipListSet.java
@@ -23,10 +23,13 @@ import java.util.Iterator;
import java.util.SortedSet;
import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestKeyValueSkipListSet extends TestCase {
private final KeyValueSkipListSet kvsls =
new KeyValueSkipListSet(KeyValue.COMPARATOR);
@@ -144,4 +147,4 @@ public class TestKeyValueSkipListSet extends TestCase {
head = this.kvsls.headSet(splitter);
assertTrue(Bytes.equals(head.first().getValue(), value2));
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStore.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStore.java
index 3f0a70da656..925b385ee46 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStore.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStore.java
@@ -33,10 +33,7 @@ import junit.framework.TestCase;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.KeyValueTestUtil;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.regionserver.Store.ScanInfo;
import org.apache.hadoop.hbase.regionserver.StoreScanner.ScanType;
@@ -45,8 +42,10 @@ import org.apache.hadoop.hbase.util.Bytes;
import com.google.common.base.Joiner;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
+import org.junit.experimental.categories.Category;
/** memstore test case */
+@Category(SmallTests.class)
public class TestMemStore extends TestCase {
private final Log LOG = LogFactory.getLog(this.getClass());
private MemStore memstore;
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreLAB.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreLAB.java
index 26c3c26cab3..220fd76831f 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreLAB.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestMemStoreLAB.java
@@ -29,6 +29,7 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.MultithreadedTestUtil;
import org.apache.hadoop.hbase.MultithreadedTestUtil.TestThread;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.regionserver.MemStoreLAB.Allocation;
import org.junit.Test;
@@ -36,7 +37,9 @@ import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.primitives.Ints;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestMemStoreLAB {
/**
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java
index 4d7245ee1b0..2ebde91acbd 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestMinVersions.java
@@ -22,19 +22,19 @@ package org.apache.hadoop.hbase.regionserver;
import java.util.ArrayList;
import java.util.List;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.filter.TimestampsFilter;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
/**
* Test Minimum Versions feature (HBASE-4071).
*/
+@Category(SmallTests.class)
public class TestMinVersions extends HBaseTestCase {
private final byte[] T0 = Bytes.toBytes("0");
private final byte[] T1 = Bytes.toBytes("1");
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
index 9a5dd14ccd6..d432a2e7178 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestMultiColumnScanner.java
@@ -35,12 +35,7 @@ import java.util.TreeSet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.KeyValueTestUtil;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Scan;
@@ -48,6 +43,7 @@ import org.apache.hadoop.hbase.io.hfile.Compression;
import org.apache.hadoop.hbase.regionserver.StoreFile.BloomType;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
@@ -56,6 +52,7 @@ import org.junit.runners.Parameterized.Parameters;
* Tests optimized scanning of multiple columns.
*/
@RunWith(Parameterized.class)
+@Category(MediumTests.class)
public class TestMultiColumnScanner {
private static final Log LOG = LogFactory.getLog(TestMultiColumnScanner.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestParallelPut.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestParallelPut.java
index efa4ffe9b9d..84226bd5397 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestParallelPut.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestParallelPut.java
@@ -30,24 +30,12 @@ import java.util.Random;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.DoNotRetryIOException;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HDFSBlocksDistribution;
-import org.apache.hadoop.hbase.ServerName;
import org.apache.hadoop.hbase.HConstants.OperationStatusCode;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.MultithreadedTestUtil;
import org.apache.hadoop.hbase.MultithreadedTestUtil.TestThread;
-import org.apache.hadoop.hbase.MiniHBaseCluster;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Put;
@@ -75,12 +63,14 @@ import org.apache.hadoop.hbase.util.Threads;
import org.junit.Test;
import com.google.common.collect.Lists;
+import org.junit.experimental.categories.Category;
/**
* Testing of multiPut in parallel.
*
*/
+@Category(MediumTests.class)
public class TestParallelPut extends HBaseTestCase {
static final Log LOG = LogFactory.getLog(TestParallelPut.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java
index dfe4db4c0d9..374130c908b 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestQueryMatcher.java
@@ -24,16 +24,16 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.KeyValue.KVComparator;
import org.apache.hadoop.hbase.KeyValue.KeyComparator;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.regionserver.ScanQueryMatcher.MatchCode;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
-
+@Category(SmallTests.class)
public class TestQueryMatcher extends HBaseTestCase {
private static final boolean PRINT = false;
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestRSStatusServlet.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestRSStatusServlet.java
index 66d6ee00ac8..bbeecd932ec 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestRSStatusServlet.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestRSStatusServlet.java
@@ -25,17 +25,14 @@ import java.io.IOException;
import java.io.StringWriter;
import java.util.List;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HServerAddress;
-import org.apache.hadoop.hbase.HServerInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.regionserver.metrics.RegionServerMetrics;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher;
import org.apache.hbase.tmpl.regionserver.RSStatusTmpl;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
import com.google.common.collect.Lists;
@@ -43,6 +40,7 @@ import com.google.common.collect.Lists;
/**
* Tests for the region server status page and its template.
*/
+@Category(SmallTests.class)
public class TestRSStatusServlet {
private HRegionServer rs;
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestReadWriteConsistencyControl.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestReadWriteConsistencyControl.java
index 92075b0b7f1..ea6d6a51c1b 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestReadWriteConsistencyControl.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestReadWriteConsistencyControl.java
@@ -20,11 +20,14 @@
package org.apache.hadoop.hbase.regionserver;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
import java.util.Random;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
+@Category(SmallTests.class)
public class TestReadWriteConsistencyControl extends TestCase {
static class Writer implements Runnable {
final AtomicBoolean finished;
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionSplitPolicy.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionSplitPolicy.java
index a85f55b499d..9769e014a34 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionSplitPolicy.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionSplitPolicy.java
@@ -23,14 +23,14 @@ import java.io.IOException;
import java.util.TreeMap;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
+@Category(SmallTests.class)
public class TestRegionSplitPolicy {
private Configuration conf;
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestResettingCounters.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestResettingCounters.java
index 55330fe12fe..cae1819d9b8 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestResettingCounters.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestResettingCounters.java
@@ -27,16 +27,14 @@ import java.io.IOException;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Increment;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestResettingCounters {
@Test
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanDeleteTracker.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanDeleteTracker.java
index a062f45c136..ff406f227fa 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanDeleteTracker.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanDeleteTracker.java
@@ -20,13 +20,13 @@
package org.apache.hadoop.hbase.regionserver;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.regionserver.DeleteTracker.DeleteResult;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestScanDeleteTracker extends HBaseTestCase {
private ScanDeleteTracker sdt;
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWildcardColumnTracker.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWildcardColumnTracker.java
index 80131fddd80..ef95cfa5134 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWildcardColumnTracker.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanWildcardColumnTracker.java
@@ -24,11 +24,12 @@ import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.regionserver.ScanQueryMatcher.MatchCode;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestScanWildcardColumnTracker extends HBaseTestCase {
final static int VERSIONS = 2;
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
index 5cad92b8368..03474a6827f 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestScanner.java
@@ -27,13 +27,7 @@ import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.UnknownScannerException;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Result;
@@ -46,10 +40,12 @@ import org.apache.hadoop.hbase.io.hfile.Compression;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.util.Writables;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.junit.experimental.categories.Category;
/**
* Test of a long-lived scanner validating as we go.
*/
+@Category(SmallTests.class)
public class TestScanner extends HBaseTestCase {
private final Log LOG = LogFactory.getLog(this.getClass());
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
index 408edc6b37f..6bcd2347479 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestSplitTransaction.java
@@ -31,13 +31,7 @@ import java.util.List;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.Server;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.regionserver.wal.HLog;
import org.apache.hadoop.hbase.util.Bytes;
@@ -46,14 +40,16 @@ import org.apache.zookeeper.KeeperException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
/**
* Test the {@link SplitTransaction} class against an HRegion (as opposed to
* running cluster).
*/
+@Category(SmallTests.class)
public class TestSplitTransaction {
- private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
+ private final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private final Path testdir =
TEST_UTIL.getDataTestDir(this.getClass().getName());
private HRegion parent;
@@ -64,15 +60,22 @@ public class TestSplitTransaction {
private static final byte [] ENDROW = new byte [] {'{', '{', '{'};
private static final byte [] GOOD_SPLIT_ROW = new byte [] {'d', 'd', 'd'};
private static final byte [] CF = HConstants.CATALOG_FAMILY;
+
+ static {
+ System.out.println("AAAA static");
+ }
@Before public void setup() throws IOException {
+ System.out.println("AAAA setup");
this.fs = FileSystem.get(TEST_UTIL.getConfiguration());
this.fs.delete(this.testdir, true);
this.wal = new HLog(fs, new Path(this.testdir, "logs"),
new Path(this.testdir, "archive"),
TEST_UTIL.getConfiguration());
+ System.out.println("AAAA setup createRegion");
this.parent = createRegion(this.testdir, this.wal);
TEST_UTIL.getConfiguration().setBoolean("hbase.testing.nocluster", true);
+ System.out.println("AAAA setup ends");
}
@After public void teardown() throws IOException {
@@ -86,6 +89,7 @@ public class TestSplitTransaction {
}
@Test public void testFailAfterPONR() throws IOException, KeeperException {
+ System.out.println("AAAA testFailAfterPONR");
final int rowcount = TEST_UTIL.loadRegion(this.parent, CF);
assertTrue(rowcount > 0);
int parentRowCount = countRows(this.parent);
@@ -289,7 +293,7 @@ public class TestSplitTransaction {
return rowcount;
}
- static HRegion createRegion(final Path testdir, final HLog wal)
+ HRegion createRegion(final Path testdir, final HLog wal)
throws IOException {
// Make a region with start and end keys. Use 'aaa', to 'AAA'. The load
// region utility will add rows between 'aaa' and 'zzz'.
@@ -301,4 +305,4 @@ public class TestSplitTransaction {
return HRegion.openHRegion(testdir, hri, htd, wal,
TEST_UTIL.getConfiguration());
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java
index 9b30f3f4447..bbeea5c3566 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFile.java
@@ -33,10 +33,7 @@ import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.io.Reference.Range;
import org.apache.hadoop.hbase.io.hfile.BlockCache;
@@ -47,6 +44,7 @@ import org.apache.hadoop.hbase.io.hfile.HFileScanner;
import org.apache.hadoop.hbase.util.BloomFilterFactory;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
import com.google.common.base.Joiner;
@@ -56,6 +54,7 @@ import com.google.common.collect.Lists;
/**
* Test HStoreFile
*/
+@Category(SmallTests.class)
public class TestStoreFile extends HBaseTestCase {
static final Log LOG = LogFactory.getLog(TestStoreFile.class);
private CacheConfig cacheConf = new CacheConfig(conf);
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
index 0940fbd6446..4d2f5a66b93 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreScanner.java
@@ -21,12 +21,12 @@
package org.apache.hadoop.hbase.regionserver;
import junit.framework.TestCase;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.KeyValueTestUtil;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.regionserver.Store.ScanInfo;
import org.apache.hadoop.hbase.regionserver.StoreScanner.ScanType;
import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.experimental.categories.Category;
import java.io.IOException;
import java.util.ArrayList;
@@ -36,6 +36,7 @@ import java.util.NavigableSet;
import java.util.TreeSet;
import static org.apache.hadoop.hbase.regionserver.KeyValueScanFixture.scanFixture;
+@Category(SmallTests.class)
public class TestStoreScanner extends TestCase {
private static final String CF_STR = "cf";
final byte [] CF = Bytes.toBytes(CF_STR);
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java b/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
index d39a231ab2e..ccd392f5ba4 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/TestWideScanner.java
@@ -28,18 +28,15 @@ import java.util.Random;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.HBaseTestCase;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.KeyValue;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.client.Scan;
import org.apache.hadoop.hbase.io.hfile.Compression;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hdfs.MiniDFSCluster;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestWideScanner extends HBaseTestCase {
private final Log LOG = LogFactory.getLog(this.getClass());
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestCloseRegionHandler.java b/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestCloseRegionHandler.java
index d128e62236c..c7400df28dc 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestCloseRegionHandler.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/handler/TestCloseRegionHandler.java
@@ -25,11 +25,7 @@ import java.io.IOException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.Server;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.regionserver.RegionServerServices;
import org.apache.hadoop.hbase.util.MockRegionServerServices;
@@ -37,11 +33,13 @@ import org.apache.hadoop.hbase.util.MockServer;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.KeeperException.NodeExistsException;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
/**
* Test of the {@link CloseRegionHandler}.
*/
+@Category(MediumTests.class)
public class TestCloseRegionHandler {
static final Log LOG = LogFactory.getLog(TestCloseRegionHandler.class);
private final static HBaseTestingUtility HTU = new HBaseTestingUtility();
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogBench.java b/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogBench.java
index 2b5407adbe1..b3d36ad23aa 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogBench.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogBench.java
@@ -23,6 +23,7 @@ import java.io.IOException;
import java.util.Random;
import org.apache.commons.logging.impl.Log4JLogger;
+import org.apache.hadoop.hbase.*;
import org.apache.log4j.Level;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -33,18 +34,14 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.KeyValue;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
import org.apache.hadoop.hbase.regionserver.HRegion;
import org.apache.hadoop.hbase.util.Bytes;
import org.apache.hadoop.hbase.ipc.HBaseRPC;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(MediumTests.class)
public class TestHLogBench extends Configured implements Tool {
static final Log LOG = LogFactory.getLog(TestHLogBench.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogMethods.java b/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogMethods.java
index e5a3bede086..43d721c391b 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogMethods.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestHLogMethods.java
@@ -28,18 +28,19 @@ import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FSDataOutputStream;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.KeyValueTestUtil;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.regionserver.wal.HLogSplitter.EntryBuffers;
import org.apache.hadoop.hbase.regionserver.wal.HLogSplitter.RegionEntryBuffer;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import static org.mockito.Mockito.mock;
/**
* Simple testing of a few HLog methods.
*/
+@Category(SmallTests.class)
public class TestHLogMethods {
private static final byte[] TEST_REGION = Bytes.toBytes("test_region");;
private static final byte[] TEST_TABLE = Bytes.toBytes("test_table");
diff --git a/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALActionsListener.java b/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALActionsListener.java
index bbb38a18217..a6e540455db 100644
--- a/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALActionsListener.java
+++ b/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestWALActionsListener.java
@@ -33,11 +33,14 @@ import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import static org.junit.Assert.*;
/**
* Test that the actions are called while playing with an HLog
*/
+@Category(SmallTests.class)
public class TestWALActionsListener {
protected static final Log LOG = LogFactory.getLog(TestWALActionsListener.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java
index d4f1caca29c..a5921dbe79f 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellModel.java
@@ -27,11 +27,14 @@ import java.io.StringWriter;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Base64;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestCellModel extends TestCase {
private static final long TIMESTAMP = 1245219839331L;
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellSetModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellSetModel.java
index 0f334a04261..d96fbae048d 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellSetModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestCellSetModel.java
@@ -28,11 +28,14 @@ import java.util.Iterator;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Base64;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestCellSetModel extends TestCase {
private static final byte[] ROW1 = Bytes.toBytes("testrow1");
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestColumnSchemaModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestColumnSchemaModel.java
index dbbb99b20f9..92a6a1fd288 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestColumnSchemaModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestColumnSchemaModel.java
@@ -27,7 +27,10 @@ import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestColumnSchemaModel extends TestCase {
protected static final String COLUMN_NAME = "testcolumn";
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java
index e7fd1f686a3..2b1dd8c5869 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestRowModel.java
@@ -27,10 +27,13 @@ import java.util.Iterator;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestRowModel extends TestCase {
private static final byte[] ROW1 = Bytes.toBytes("testrow1");
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestScannerModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestScannerModel.java
index f2b0d3c268b..69a2f3746fd 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestScannerModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestScannerModel.java
@@ -27,11 +27,14 @@ import java.io.StringWriter;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Base64;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestScannerModel extends TestCase {
private static final byte[] START_ROW = Bytes.toBytes("abracadabra");
private static final byte[] END_ROW = Bytes.toBytes("zzyzx");
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
index 40be2c49b9f..e6aec0979a7 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterStatusModel.java
@@ -28,11 +28,14 @@ import java.util.Iterator;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Base64;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestStorageClusterStatusModel extends TestCase {
private static final String AS_XML =
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterVersionModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterVersionModel.java
index e0d1b0f34e7..fd791c60ea8 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterVersionModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestStorageClusterVersionModel.java
@@ -27,7 +27,10 @@ import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestStorageClusterVersionModel extends TestCase {
private static final String VERSION = "0.0.1-testing";
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableInfoModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableInfoModel.java
index 099823197a8..47e9783bbf4 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableInfoModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableInfoModel.java
@@ -28,11 +28,14 @@ import java.util.Iterator;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Base64;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestTableInfoModel extends TestCase {
private static final String TABLE = "testtable";
private static final byte[] START_KEY = Bytes.toBytes("abracadbra");
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableListModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableListModel.java
index 4dc449ad019..210c90f302e 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableListModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableListModel.java
@@ -28,10 +28,13 @@ import java.util.Iterator;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Base64;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestTableListModel extends TestCase {
private static final String TABLE1 = "table1";
private static final String TABLE2 = "table2";
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableRegionModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableRegionModel.java
index fdfdc012729..60e0e41ccce 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableRegionModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableRegionModel.java
@@ -26,12 +26,13 @@ import java.io.StringWriter;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
-import org.apache.hadoop.hbase.HRegionInfo;
-import org.apache.hadoop.hbase.HTableDescriptor;
+import org.apache.hadoop.hbase.*;
import org.apache.hadoop.hbase.util.Bytes;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestTableRegionModel extends TestCase {
private static final String TABLE = "testtable";
private static final byte[] START_KEY = Bytes.toBytes("abracadbra");
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableSchemaModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableSchemaModel.java
index 1d0606b7eac..9372f5edf1f 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableSchemaModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestTableSchemaModel.java
@@ -28,10 +28,13 @@ import java.util.Iterator;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Base64;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestTableSchemaModel extends TestCase {
public static final String TABLE_NAME = "testTable";
diff --git a/src/test/java/org/apache/hadoop/hbase/rest/model/TestVersionModel.java b/src/test/java/org/apache/hadoop/hbase/rest/model/TestVersionModel.java
index f5c2c848b34..73688095796 100644
--- a/src/test/java/org/apache/hadoop/hbase/rest/model/TestVersionModel.java
+++ b/src/test/java/org/apache/hadoop/hbase/rest/model/TestVersionModel.java
@@ -27,10 +27,13 @@ import java.io.StringWriter;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.Base64;
import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestVersionModel extends TestCase {
private static final String REST_VERSION = "0.0.1";
private static final String OS_VERSION =
diff --git a/src/test/java/org/apache/hadoop/hbase/security/TestUser.java b/src/test/java/org/apache/hadoop/hbase/security/TestUser.java
index 7d1e63ea960..02ff6c6cc42 100644
--- a/src/test/java/org/apache/hadoop/hbase/security/TestUser.java
+++ b/src/test/java/org/apache/hadoop/hbase/security/TestUser.java
@@ -25,12 +25,15 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
+import org.apache.hadoop.hbase.SmallTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.io.IOException;
import java.security.PrivilegedAction;
import java.security.PrivilegedExceptionAction;
+@Category(SmallTests.class)
public class TestUser {
private static Log LOG = LogFactory.getLog(TestUser.class);
diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestBase64.java b/src/test/java/org/apache/hadoop/hbase/util/TestBase64.java
index 9be5c0c5d31..dd69ebf153d 100644
--- a/src/test/java/org/apache/hadoop/hbase/util/TestBase64.java
+++ b/src/test/java/org/apache/hadoop/hbase/util/TestBase64.java
@@ -25,10 +25,13 @@ import java.util.Map;
import java.util.TreeMap;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
/**
* Test order preservation characteristics of ordered Base64 dialect
*/
+@Category(SmallTests.class)
public class TestBase64 extends TestCase {
// Note: uris is sorted. We need to prove that the ordered Base64
// preserves that ordering
diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestByteBloomFilter.java b/src/test/java/org/apache/hadoop/hbase/util/TestByteBloomFilter.java
index e54296300f9..fee6fce3a79 100644
--- a/src/test/java/org/apache/hadoop/hbase/util/TestByteBloomFilter.java
+++ b/src/test/java/org/apache/hadoop/hbase/util/TestByteBloomFilter.java
@@ -25,7 +25,10 @@ import java.io.DataOutputStream;
import java.nio.ByteBuffer;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestByteBloomFilter extends TestCase {
public void testBasicBloom() throws Exception {
diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestBytes.java b/src/test/java/org/apache/hadoop/hbase/util/TestBytes.java
index 7ac304b5303..e153fea9ecf 100644
--- a/src/test/java/org/apache/hadoop/hbase/util/TestBytes.java
+++ b/src/test/java/org/apache/hadoop/hbase/util/TestBytes.java
@@ -28,7 +28,10 @@ import java.math.BigDecimal;
import java.util.Arrays;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestBytes extends TestCase {
public void testNullHashCode() {
byte [] b = null;
diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestCompressionTest.java b/src/test/java/org/apache/hadoop/hbase/util/TestCompressionTest.java
index c0d53edf0fd..b8d0c79f062 100644
--- a/src/test/java/org/apache/hadoop/hbase/util/TestCompressionTest.java
+++ b/src/test/java/org/apache/hadoop/hbase/util/TestCompressionTest.java
@@ -21,6 +21,7 @@
package org.apache.hadoop.hbase.util;
import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.io.hfile.Compression;
import org.apache.hadoop.io.DataOutputBuffer;
import org.apache.hadoop.io.compress.CompressionCodec;
@@ -28,6 +29,7 @@ import org.apache.hadoop.io.compress.CompressionOutputStream;
import org.apache.hadoop.util.NativeCodeLoader;
import org.apache.hadoop.util.ReflectionUtils;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.io.BufferedOutputStream;
import java.io.DataOutputStream;
@@ -35,6 +37,7 @@ import java.io.IOException;
import static org.junit.Assert.*;
+@Category(SmallTests.class)
public class TestCompressionTest {
@Test
diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestFSTableDescriptors.java b/src/test/java/org/apache/hadoop/hbase/util/TestFSTableDescriptors.java
index 43e8ac78b20..f7e44313ecd 100644
--- a/src/test/java/org/apache/hadoop/hbase/util/TestFSTableDescriptors.java
+++ b/src/test/java/org/apache/hadoop/hbase/util/TestFSTableDescriptors.java
@@ -28,18 +28,15 @@ import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HColumnDescriptor;
-import org.apache.hadoop.hbase.HConstants;
-import org.apache.hadoop.hbase.HTableDescriptor;
-import org.apache.hadoop.hbase.TableDescriptors;
-import org.apache.hadoop.hbase.TableExistsException;
+import org.apache.hadoop.hbase.*;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Tests for {@link FSTableDescriptors}.
*/
+@Category(SmallTests.class)
public class TestFSTableDescriptors {
private static final HBaseTestingUtility UTIL = new HBaseTestingUtility();
private static final Log LOG = LogFactory.getLog(TestFSTableDescriptors.class);
@@ -252,4 +249,4 @@ public class TestFSTableDescriptors {
assertTrue(clist[i].equals(i == 0? farFuture: i == 1? future: bare));
}
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckComparator.java b/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckComparator.java
index 916696868a0..57e1cb31d52 100644
--- a/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckComparator.java
+++ b/src/test/java/org/apache/hadoop/hbase/util/TestHBaseFsckComparator.java
@@ -23,13 +23,16 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.apache.hadoop.hbase.HRegionInfo;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.HBaseFsck.HbckInfo;
import org.apache.hadoop.hbase.util.HBaseFsck.MetaEntry;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
/**
* Test the comparator used by Hbck.
*/
+@Category(SmallTests.class)
public class TestHBaseFsckComparator {
byte[] table = Bytes.toBytes("table1");
diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestKeying.java b/src/test/java/org/apache/hadoop/hbase/util/TestKeying.java
index 7ce55209a72..14494d08a1a 100644
--- a/src/test/java/org/apache/hadoop/hbase/util/TestKeying.java
+++ b/src/test/java/org/apache/hadoop/hbase/util/TestKeying.java
@@ -20,10 +20,13 @@
package org.apache.hadoop.hbase.util;
import junit.framework.TestCase;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
/**
* Tests url transformations
*/
+@Category(SmallTests.class)
public class TestKeying extends TestCase {
@Override
@@ -59,4 +62,4 @@ public class TestKeying extends TestCase {
System.out.println("Original url " + u + ", Transformed url " + k);
assertEquals(u, uri);
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestPoolMap.java b/src/test/java/org/apache/hadoop/hbase/util/TestPoolMap.java
index 2c565d70c6b..bfeb8297f3c 100644
--- a/src/test/java/org/apache/hadoop/hbase/util/TestPoolMap.java
+++ b/src/test/java/org/apache/hadoop/hbase/util/TestPoolMap.java
@@ -29,8 +29,11 @@ import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
+import org.apache.hadoop.hbase.SmallTests;
import org.apache.hadoop.hbase.util.PoolMap.PoolType;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestPoolMap {
public abstract static class TestPoolType extends TestCase {
protected PoolMap poolMap;
diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestRootPath.java b/src/test/java/org/apache/hadoop/hbase/util/TestRootPath.java
index 10c9926aca9..924f1f8cd9a 100644
--- a/src/test/java/org/apache/hadoop/hbase/util/TestRootPath.java
+++ b/src/test/java/org/apache/hadoop/hbase/util/TestRootPath.java
@@ -28,10 +28,13 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.fs.Path;
+import org.apache.hadoop.hbase.SmallTests;
+import org.junit.experimental.categories.Category;
/**
* Test requirement that root directory must be a URI
*/
+@Category(SmallTests.class)
public class TestRootPath extends TestCase {
private static final Log LOG = LogFactory.getLog(TestRootPath.class);
@@ -60,4 +63,4 @@ public class TestRootPath extends TestCase {
LOG.info("Got expected exception when checking invalid path:", e);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/test/java/org/apache/hadoop/hbase/util/TestSortedCopyOnWriteSet.java b/src/test/java/org/apache/hadoop/hbase/util/TestSortedCopyOnWriteSet.java
index f53507c825a..705c8579ccd 100644
--- a/src/test/java/org/apache/hadoop/hbase/util/TestSortedCopyOnWriteSet.java
+++ b/src/test/java/org/apache/hadoop/hbase/util/TestSortedCopyOnWriteSet.java
@@ -26,8 +26,11 @@ import java.util.Arrays;
import java.util.Iterator;
import com.google.common.collect.Lists;
+import org.apache.hadoop.hbase.SmallTests;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
+@Category(SmallTests.class)
public class TestSortedCopyOnWriteSet {
@Test
diff --git a/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java b/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java
index 8a1cc734b9c..8e50117e057 100644
--- a/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java
+++ b/src/test/java/org/apache/hadoop/hbase/zookeeper/TestHQuorumPeer.java
@@ -28,13 +28,12 @@ import java.util.Properties;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HBaseTestingUtility;
-import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.*;
import org.apache.zookeeper.server.quorum.QuorumPeerConfig;
import org.apache.zookeeper.server.quorum.QuorumPeer.QuorumServer;
import org.junit.Before;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.*;
@@ -42,6 +41,7 @@ import static org.junit.Assert.*;
/**
* Test for HQuorumPeer.
*/
+@Category(SmallTests.class)
public class TestHQuorumPeer {
private static final HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility();
private static int PORT_NO = 21818;
diff --git a/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperMainServerArg.java b/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperMainServerArg.java
index e9cf7b59eeb..d833cecb8f5 100644
--- a/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperMainServerArg.java
+++ b/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperMainServerArg.java
@@ -23,11 +23,11 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hbase.HBaseConfiguration;
-import org.apache.hadoop.hbase.HConstants;
+import org.apache.hadoop.hbase.*;
import org.junit.Test;
+import org.junit.experimental.categories.Category;
-
+@Category(SmallTests.class)
public class TestZooKeeperMainServerArg {
private final ZooKeeperMainServerArg parser = new ZooKeeperMainServerArg();