diff --git a/security/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessControlFilter.java b/security/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessControlFilter.java index 1cd8face9e6..0a2cad27c73 100644 --- a/security/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessControlFilter.java +++ b/security/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessControlFilter.java @@ -18,7 +18,10 @@ package org.apache.hadoop.hbase.security.access; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.security.PrivilegedExceptionAction; import java.util.ArrayList; @@ -29,6 +32,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseTestingUtility; +import org.apache.hadoop.hbase.LargeTests; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Put; import org.apache.hadoop.hbase.client.Result; @@ -40,7 +44,9 @@ import org.apache.hadoop.hbase.util.Bytes; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; +@Category(LargeTests.class) public class TestAccessControlFilter { private static Log LOG = LogFactory.getLog(TestAccessControlFilter.class); private static HBaseTestingUtility TEST_UTIL; diff --git a/security/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java b/security/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java index 174490a073f..fe04c5a69ba 100644 --- a/security/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java +++ b/security/src/test/java/org/apache/hadoop/hbase/security/access/TestAccessController.java @@ -36,6 +36,7 @@ import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HRegionInfo; import org.apache.hadoop.hbase.HServerAddress; import org.apache.hadoop.hbase.HTableDescriptor; +import org.apache.hadoop.hbase.LargeTests; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.client.Delete; import org.apache.hadoop.hbase.client.Get; @@ -57,11 +58,13 @@ import org.apache.hadoop.hbase.util.Bytes; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; /** * Performs authorization checks for common operations, according to different * levels of authorized users. */ +@Category(LargeTests.class) public class TestAccessController { private static Log LOG = LogFactory.getLog(TestAccessController.class); private static HBaseTestingUtility TEST_UTIL = new HBaseTestingUtility(); diff --git a/security/src/test/java/org/apache/hadoop/hbase/security/access/TestTablePermissions.java b/security/src/test/java/org/apache/hadoop/hbase/security/access/TestTablePermissions.java index 8a4dbb67e7b..39fc73e7898 100644 --- a/security/src/test/java/org/apache/hadoop/hbase/security/access/TestTablePermissions.java +++ b/security/src/test/java/org/apache/hadoop/hbase/security/access/TestTablePermissions.java @@ -18,13 +18,27 @@ package org.apache.hadoop.hbase.security.access; -import com.google.common.collect.ArrayListMultimap; -import com.google.common.collect.ListMultimap; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.concurrent.atomic.AtomicBoolean; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Abortable; import org.apache.hadoop.hbase.HBaseTestingUtility; +import org.apache.hadoop.hbase.LargeTests; import org.apache.hadoop.hbase.client.HBaseAdmin; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Put; @@ -33,18 +47,15 @@ import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; -import java.io.*; -import java.util.Arrays; -import java.util.List; -import java.util.Map; -import java.util.concurrent.atomic.AtomicBoolean; - -import static org.junit.Assert.*; +import com.google.common.collect.ArrayListMultimap; +import com.google.common.collect.ListMultimap; /** * Test the reading and writing of access permissions on {@code _acl_} table. */ +@Category(LargeTests.class) public class TestTablePermissions { private static final Log LOG = LogFactory.getLog(TestTablePermissions.class); private static final HBaseTestingUtility UTIL = new HBaseTestingUtility(); diff --git a/security/src/test/java/org/apache/hadoop/hbase/security/access/TestZKPermissionsWatcher.java b/security/src/test/java/org/apache/hadoop/hbase/security/access/TestZKPermissionsWatcher.java index b6be21051a0..0a17e4edef2 100644 --- a/security/src/test/java/org/apache/hadoop/hbase/security/access/TestZKPermissionsWatcher.java +++ b/security/src/test/java/org/apache/hadoop/hbase/security/access/TestZKPermissionsWatcher.java @@ -18,27 +18,30 @@ package org.apache.hadoop.hbase.security.access; -import static org.junit.Assert.*; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.atomic.AtomicBoolean; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Abortable; import org.apache.hadoop.hbase.HBaseTestingUtility; +import org.apache.hadoop.hbase.LargeTests; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; - -import java.io.*; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.atomic.AtomicBoolean; +import org.junit.experimental.categories.Category; /** * Test the reading and writing of access permissions to and from zookeeper. */ +@Category(LargeTests.class) public class TestZKPermissionsWatcher { private static final Log LOG = LogFactory.getLog(TestZKPermissionsWatcher.class); private static final HBaseTestingUtility UTIL = new HBaseTestingUtility(); diff --git a/security/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java b/security/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java index c2c27b93d5c..64b53e9cfd8 100644 --- a/security/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java +++ b/security/src/test/java/org/apache/hadoop/hbase/security/token/TestTokenAuthentication.java @@ -27,6 +27,7 @@ import java.util.UUID; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HConstants; +import org.apache.hadoop.hbase.LargeTests; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.coprocessor.BaseEndpointCoprocessor; import org.apache.hadoop.hbase.ipc.CoprocessorProtocol; @@ -41,15 +42,16 @@ import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.Writables; import org.apache.hadoop.security.UserGroupInformation; import org.apache.hadoop.security.token.SecretManager; - import org.apache.hadoop.security.token.Token; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; /** * Tests for authentication token creation and usage */ +@Category(LargeTests.class) public class TestTokenAuthentication { public static interface IdentityProtocol extends CoprocessorProtocol { public String whoami(); diff --git a/security/src/test/java/org/apache/hadoop/hbase/security/token/TestZKSecretWatcher.java b/security/src/test/java/org/apache/hadoop/hbase/security/token/TestZKSecretWatcher.java index f93c189cb3f..bad817c7cdc 100644 --- a/security/src/test/java/org/apache/hadoop/hbase/security/token/TestZKSecretWatcher.java +++ b/security/src/test/java/org/apache/hadoop/hbase/security/token/TestZKSecretWatcher.java @@ -18,27 +18,31 @@ package org.apache.hadoop.hbase.security.token; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; -import java.util.Map; - -import com.google.common.collect.Maps; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Abortable; import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HBaseTestingUtility; +import org.apache.hadoop.hbase.LargeTests; import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; import org.apache.hadoop.hbase.zookeeper.ZooKeeperWatcher; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; /** * Test the synchronization of token authentication master keys through * ZKSecretWatcher */ +@Category(LargeTests.class) public class TestZKSecretWatcher { private static Log LOG = LogFactory.getLog(TestZKSecretWatcher.class); private static HBaseTestingUtility TEST_UTIL; diff --git a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileDataBlockEncoder.java b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileDataBlockEncoder.java index 9a4673e07b4..e1a57e52d22 100644 --- a/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileDataBlockEncoder.java +++ b/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileDataBlockEncoder.java @@ -27,6 +27,7 @@ import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseTestingUtility; +import org.apache.hadoop.hbase.SmallTests; import org.apache.hadoop.hbase.io.HeapSize; import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding; import org.apache.hadoop.hbase.io.encoding.RedundantKVGenerator; @@ -36,11 +37,13 @@ import org.apache.hadoop.hbase.util.Pair; import org.junit.After; import org.junit.Before; 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; @RunWith(Parameterized.class) +@Category(SmallTests.class) public class TestHFileDataBlockEncoder { private Configuration conf; private final HBaseTestingUtility TEST_UTIL =