HIVE-18588 Add categories to unit tests to divide them into unit and checkin 
tests.


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/c4d22858
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/c4d22858
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/c4d22858

Branch: refs/heads/standalone-metastore
Commit: c4d22858c997375ed0f578f9012b2747ff7d1169
Parents: a9e1aca
Author: Alan Gates <ga...@hortonworks.com>
Authored: Thu Feb 1 09:07:14 2018 -0800
Committer: Alan Gates <ga...@hortonworks.com>
Committed: Mon Feb 12 10:40:22 2018 -0800

----------------------------------------------------------------------
 standalone-metastore/DEV-README                 | 23 ++++++++++
 standalone-metastore/pom.xml                    | 47 +++++++++++++++++++-
 .../hadoop/hive/common/TestStatsSetupConst.java |  4 ++
 .../ndv/fm/TestFMSketchSerialization.java       |  3 ++
 .../hive/common/ndv/hll/TestHLLNoBias.java      |  3 ++
 .../common/ndv/hll/TestHLLSerialization.java    |  3 ++
 .../hive/common/ndv/hll/TestHyperLogLog.java    |  3 ++
 .../common/ndv/hll/TestHyperLogLogDense.java    |  3 ++
 .../common/ndv/hll/TestHyperLogLogSparse.java   |  3 ++
 .../common/ndv/hll/TestSparseEncodeHash.java    |  3 ++
 .../hadoop/hive/metastore/TestAdminUser.java    |  3 ++
 .../hive/metastore/TestAggregateStatsCache.java |  3 ++
 .../hadoop/hive/metastore/TestDeadline.java     |  3 ++
 .../metastore/TestEmbeddedHiveMetaStore.java    |  3 ++
 .../hadoop/hive/metastore/TestFilterHooks.java  |  3 ++
 .../hive/metastore/TestHiveAlterHandler.java    |  3 ++
 .../metastore/TestHiveMetaStoreGetMetaConf.java |  3 ++
 .../TestHiveMetaStorePartitionSpecs.java        |  3 ++
 .../metastore/TestHiveMetaStoreTimeout.java     |  3 ++
 .../hive/metastore/TestHiveMetaStoreTxns.java   |  3 ++
 ...TestHiveMetaStoreWithEnvironmentContext.java |  3 ++
 .../hive/metastore/TestHiveMetastoreCli.java    |  3 ++
 .../hive/metastore/TestLockRequestBuilder.java  |  3 ++
 .../hive/metastore/TestMarkPartition.java       |  3 ++
 .../hive/metastore/TestMarkPartitionRemote.java |  3 ++
 .../TestMetaStoreConnectionUrlHook.java         |  3 ++
 .../TestMetaStoreEndFunctionListener.java       |  3 ++
 .../metastore/TestMetaStoreEventListener.java   |  3 ++
 .../TestMetaStoreEventListenerOnlyOnCommit.java |  3 ++
 .../TestMetaStoreEventListenerWithOldConf.java  |  3 ++
 .../metastore/TestMetaStoreInitListener.java    |  3 ++
 .../metastore/TestMetaStoreListenersError.java  |  3 ++
 .../metastore/TestMetaStoreSchemaFactory.java   |  3 ++
 .../hive/metastore/TestMetaStoreSchemaInfo.java |  3 ++
 .../hadoop/hive/metastore/TestObjectStore.java  |  3 ++
 .../metastore/TestObjectStoreInitRetry.java     |  3 ++
 .../hadoop/hive/metastore/TestOldSchema.java    |  3 ++
 .../TestPartitionNameWhitelistValidation.java   |  3 ++
 .../hive/metastore/TestRawStoreProxy.java       |  3 ++
 .../hive/metastore/TestRemoteHiveMetaStore.java |  3 ++
 .../TestRemoteHiveMetaStoreIpAddress.java       |  3 ++
 .../TestRemoteUGIHiveMetaStoreIpAddress.java    |  3 ++
 .../TestRetriesInRetryingHMSHandler.java        |  3 ++
 .../hive/metastore/TestRetryingHMSHandler.java  |  3 ++
 .../metastore/TestSetUGIOnBothClientServer.java |  3 ++
 .../hive/metastore/TestSetUGIOnOnlyClient.java  |  3 ++
 .../hive/metastore/TestSetUGIOnOnlyServer.java  |  3 ++
 .../annotation/MetastoreCheckinTest.java        | 25 +++++++++++
 .../metastore/annotation/MetastoreTest.java     | 24 ++++++++++
 .../metastore/annotation/MetastoreUnitTest.java | 25 +++++++++++
 .../hive/metastore/cache/TestCachedStore.java   |  4 +-
 .../client/TestAddAlterDropIndexes.java         |  3 ++
 .../metastore/client/TestAddPartitions.java     |  3 ++
 .../metastore/client/TestAlterPartitions.java   |  3 ++
 .../metastore/client/TestAppendPartitions.java  |  3 ++
 .../hive/metastore/client/TestDatabases.java    |  3 ++
 .../metastore/client/TestDropPartitions.java    |  3 ++
 .../hive/metastore/client/TestFunctions.java    |  3 ++
 .../metastore/client/TestGetListIndexes.java    |  3 ++
 .../metastore/client/TestGetPartitions.java     |  3 ++
 .../metastore/client/TestListPartitions.java    |  3 ++
 .../TestTablesCreateDropAlterTruncate.java      |  3 ++
 .../metastore/client/TestTablesGetExists.java   |  3 ++
 .../hive/metastore/client/TestTablesList.java   |  3 ++
 .../hive/metastore/conf/TestMetastoreConf.java  |  3 ++
 .../TestDataSourceProviderFactory.java          |  3 ++
 .../json/TestJSONMessageDeserializer.java       |  3 ++
 .../hive/metastore/metrics/TestMetrics.java     |  3 ++
 .../metastore/txn/TestTxnHandlerNegative.java   |  3 ++
 .../hadoop/hive/metastore/txn/TestTxnUtils.java |  3 ++
 .../hive/metastore/utils/TestHdfsUtils.java     |  3 ++
 .../metastore/utils/TestMetaStoreUtils.java     |  3 ++
 72 files changed, 345 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/DEV-README
----------------------------------------------------------------------
diff --git a/standalone-metastore/DEV-README b/standalone-metastore/DEV-README
index 446f580..8da2c7b 100644
--- a/standalone-metastore/DEV-README
+++ b/standalone-metastore/DEV-README
@@ -1,5 +1,28 @@
 This file contains information for developers and testers.
 
+Running unit and checkin tests:
+By default only some of the tests in standalone-metastore are run.  This is 
+done to keep the runtime of the unit tests under 5 minutes.  These are referred
+to as the unit tests.  The remainder of the tests are referred to as checkin
+tests and are run by the CI process.  It is also advised that you run the
+checkin tests before loading a patch.
+
+To run just the checkin tests:
+'mvn test 
-Dtest.groups=org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest'
+
+To run all of the tests (exclusive of the databases tests, see below):
+'mvn test -Dtest.groups=""'.  At the moment this takes around 25 minutes.
+
+When adding a test, if you want it to run as part of the unit tests annotate it
+with MetastoreUnitTest.  To make it part of the checkin tests annotate it with
+MetastoreCheckinTest.  We want to keep the unit test runs as quick as possible.
+If you write a test that takes more than 5 seconds to run the whole test class
+please put it in the checkin tests.  If it tests something that needs to be 
+tested in unit test runs break it into multiple classes so that a
+quick test can be done for the unit tests and more in depth testing as part
+of the checkin tests.
+
+--------------------------------------------------------------------------------
 Testing metastore installation and upgrade against databases beyond Derby:
 There are integration tests for testing installation and upgrade of the
 metastore on MySQL (actually MariaDB is used), Oracle, Postgres, and SQLServer.

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/pom.xml
----------------------------------------------------------------------
diff --git a/standalone-metastore/pom.xml b/standalone-metastore/pom.xml
index 9d22744..ce42b06 100644
--- a/standalone-metastore/pom.xml
+++ b/standalone-metastore/pom.xml
@@ -49,12 +49,14 @@
     <test.forkcount>1</test.forkcount>
     <skipITests>true</skipITests>
     
<itest.jdbc.jars>set-this-to-colon-separated-full-path-list-of-jars-to-run-integration-tests</itest.jdbc.jars>
+    
<test.groups>org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest</test.groups>
 
     <!-- Plugin versions -->
     <ant.contrib.version>1.0b3</ant.contrib.version>
     <maven.antrun.plugin.version>1.7</maven.antrun.plugin.version>
     <checkstyle.conf.dir>${basedir}/checkstyle/</checkstyle.conf.dir>
     <maven.checkstyle.plugin.version>2.17</maven.checkstyle.plugin.version>
+    <maven.surefire.version>2.20.1</maven.surefire.version>
 
     <!-- Dependency versions -->
     <antlr.version>3.5.2</antlr.version>
@@ -420,6 +422,48 @@
         </plugins>
       </build>
     </profile>
+      <!--
+    <profile>
+      <id>checkin</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <version>${maven.surefire.version}</version>
+            <configuration>
+              <includes>
+                <include>**/Test*</include>
+              </includes>
+              <redirectTestOutputToFile>true</redirectTestOutputToFile>
+              <reuseForks>false</reuseForks>
+              <forkCount>${test.forkcount}</forkCount>
+              <argLine>-Xmx2048m</argLine>
+              <failIfNoTests>false</failIfNoTests>
+              <systemPropertyVariables>
+                <build.dir>${project.build.directory}</build.dir>
+                
<datanucleus.schema.autoCreateAll>true</datanucleus.schema.autoCreateAll>
+                <derby.version>${derby.version}</derby.version>
+                
<derby.stream.error.file>${test.tmp.dir}/derby.log</derby.stream.error.file>
+                <log4j.debug>true</log4j.debug>
+                <java.io.tmpdir>${test.tmp.dir}</java.io.tmpdir>
+                
<javax.jdo.option.ConnectionURL>jdbc:derby:memory:${test.tmp.dir}/junit_metastore_db;create=true</javax.jdo.option.ConnectionURL>
+                
<metastore.schema.verification>false</metastore.schema.verification>
+                <test.tmp.dir>${test.tmp.dir}</test.tmp.dir>
+                
<metastore.warehouse.dir>${test.warehouse.scheme}${test.warehouse.dir}</metastore.warehouse.dir>
+              </systemPropertyVariables>
+              <additionalClasspathElements>
+                
<additionalClasspathElement>${log4j.conf.dir}</additionalClasspathElement>
+              </additionalClasspathElements>
+            </configuration>
+
+          </plugin>
+
+
+        </plugins>
+      </build>
+    </profile>
+    -->
   </profiles>
 
   <build>
@@ -605,7 +649,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.16</version>
+        <version>${maven.surefire.version}</version>
         <configuration>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <reuseForks>false</reuseForks>
@@ -627,6 +671,7 @@
           <additionalClasspathElements>
             
<additionalClasspathElement>${log4j.conf.dir}</additionalClasspathElement>
           </additionalClasspathElements>
+          <groups>${test.groups}</groups>
         </configuration>
       </plugin>
       <plugin>

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/TestStatsSetupConst.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/TestStatsSetupConst.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/TestStatsSetupConst.java
index 883e2bd..2468921 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/TestStatsSetupConst.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/TestStatsSetupConst.java
@@ -24,9 +24,13 @@ import static org.junit.Assert.assertNull;
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.junit.Test;
 
 import com.google.common.collect.Lists;
+import org.junit.experimental.categories.Category;
+
+@Category(MetastoreUnitTest.class)
 public class TestStatsSetupConst {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/fm/TestFMSketchSerialization.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/fm/TestFMSketchSerialization.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/fm/TestFMSketchSerialization.java
index e3a6f14..5eb0457 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/fm/TestFMSketchSerialization.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/fm/TestFMSketchSerialization.java
@@ -25,8 +25,11 @@ import java.io.IOException;
 import javolution.util.FastBitSet;
 
 import org.apache.hadoop.hive.common.ndv.NumDistinctValueEstimatorFactory;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreUnitTest.class)
 public class TestFMSketchSerialization {
 
   private FastBitSet[] deserialize(String s, int numBitVectors) {

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHLLNoBias.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHLLNoBias.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHLLNoBias.java
index f09cb8c..6251a59 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHLLNoBias.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHLLNoBias.java
@@ -25,12 +25,15 @@ import java.util.HashSet;
 import java.util.Random;
 import java.util.Set;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 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(value = Parameterized.class)
+@Category(MetastoreUnitTest.class)
 public class TestHLLNoBias {
 
   // 1.5% tolerance for long range bias (when no bias enabled) and 5% when (no

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHLLSerialization.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHLLSerialization.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHLLSerialization.java
index 08955d7..4796d0e 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHLLSerialization.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHLLSerialization.java
@@ -32,15 +32,18 @@ import java.util.Random;
 import java.util.Set;
 
 import org.apache.hadoop.hive.common.ndv.hll.HyperLogLog.EncodingType;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.junit.After;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
 @RunWith(value = Parameterized.class)
+@Category(MetastoreUnitTest.class)
 public class TestHLLSerialization {
 
   private int size;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLog.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLog.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLog.java
index b0eaad8..617d9c3 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLog.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLog.java
@@ -20,8 +20,11 @@ package org.apache.hadoop.hive.common.ndv.hll;
 import static org.junit.Assert.assertEquals;
 
 import org.apache.hadoop.hive.common.ndv.hll.HyperLogLog.EncodingType;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreUnitTest.class)
 public class TestHyperLogLog {
   // 5% tolerance for estimated count
   private float longRangeTolerance = 5.0f;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLogDense.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLogDense.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLogDense.java
index 106a9ed..de363e4 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLogDense.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLogDense.java
@@ -25,12 +25,15 @@ import java.util.HashSet;
 import java.util.Random;
 import java.util.Set;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 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(value = Parameterized.class)
+@Category(MetastoreUnitTest.class)
 public class TestHyperLogLogDense {
 
   // 5% tolerance for long range bias and 3% for short range bias

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLogSparse.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLogSparse.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLogSparse.java
index 50c7ea1..70563c4 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLogSparse.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestHyperLogLogSparse.java
@@ -25,12 +25,15 @@ import java.util.HashSet;
 import java.util.Random;
 import java.util.Set;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 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(value = Parameterized.class)
+@Category(MetastoreUnitTest.class)
 public class TestHyperLogLogSparse {
 
   // 5% tolerance for long range bias and 1% for short range bias

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestSparseEncodeHash.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestSparseEncodeHash.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestSparseEncodeHash.java
index bcabe95..7cf6116 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestSparseEncodeHash.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/common/ndv/hll/TestSparseEncodeHash.java
@@ -22,12 +22,15 @@ import static org.junit.Assert.assertEquals;
 import java.util.Arrays;
 import java.util.Collection;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 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(value = Parameterized.class)
+@Category(MetastoreUnitTest.class)
 public class TestSparseEncodeHash {
 
   private long input;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestAdminUser.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestAdminUser.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestAdminUser.java
index 3b541d2..499e1f8 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestAdminUser.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestAdminUser.java
@@ -19,6 +19,7 @@ package org.apache.hadoop.hive.metastore;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.metastore.HiveMetaStore.HMSHandler;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
 import org.apache.hadoop.hive.metastore.api.PrincipalType;
@@ -27,7 +28,9 @@ import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreUnitTest.class)
 public class TestAdminUser {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestAggregateStatsCache.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestAggregateStatsCache.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestAggregateStatsCache.java
index 6e06026..b95f1f2 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestAggregateStatsCache.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestAggregateStatsCache.java
@@ -24,6 +24,7 @@ import java.util.List;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.ColumnStatisticsData;
 import org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj;
 import org.apache.hadoop.hive.metastore.api.LongColumnStatsData;
@@ -38,7 +39,9 @@ import org.junit.Assert;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreUnitTest.class)
 public class TestAggregateStatsCache {
   static String DB_NAME = "db";
   static String TAB_PREFIX = "tab";

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestDeadline.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestDeadline.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestDeadline.java
index 3a8443a..83aeedb 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestDeadline.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestDeadline.java
@@ -18,15 +18,18 @@
 
 package org.apache.hadoop.hive.metastore;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Test the Deadline class used for long running requests.
  */
+@Category(MetastoreUnitTest.class)
 public class TestDeadline {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(TestDeadline.class);

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java
index 72758df..eafa92b 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestEmbeddedHiveMetaStore.java
@@ -18,10 +18,13 @@
 
 package org.apache.hadoop.hive.metastore;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.util.StringUtils;
 import org.junit.After;
 import org.junit.Before;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreUnitTest.class)
 public class TestEmbeddedHiveMetaStore extends TestHiveMetaStore {
 
   @Before

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java
index 2104636..45a65e0 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestFilterHooks.java
@@ -25,6 +25,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.Index;
 import org.apache.hadoop.hive.metastore.api.MetaException;
@@ -42,11 +43,13 @@ import 
org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Lists;
 
+@Category(MetastoreUnitTest.class)
 public class TestFilterHooks {
   private static final Logger LOG = 
LoggerFactory.getLogger(TestFilterHooks.class);
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveAlterHandler.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveAlterHandler.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveAlterHandler.java
index bc049b1..ba8c1a0 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveAlterHandler.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveAlterHandler.java
@@ -18,12 +18,15 @@
 
 package org.apache.hadoop.hive.metastore;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.*;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.mockito.Mockito;
 
 import java.util.Arrays;
 
+@Category(MetastoreUnitTest.class)
 public class TestHiveAlterHandler {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreGetMetaConf.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreGetMetaConf.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreGetMetaConf.java
index ba86e05..7d9297e 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreGetMetaConf.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreGetMetaConf.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hive.metastore;
 import java.security.Permission;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
@@ -31,6 +32,7 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.Rule;
+import org.junit.experimental.categories.Category;
 import org.junit.rules.ExpectedException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -38,6 +40,7 @@ import org.slf4j.LoggerFactory;
 import static org.junit.Assert.*;
 import org.junit.Before;
 
+@Category(MetastoreUnitTest.class)
 public class TestHiveMetaStoreGetMetaConf {
 
   @Rule

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStorePartitionSpecs.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStorePartitionSpecs.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStorePartitionSpecs.java
index 57e5a41..78227d6 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStorePartitionSpecs.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStorePartitionSpecs.java
@@ -19,6 +19,7 @@
 package org.apache.hadoop.hive.metastore;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.metastore.api.Partition;
@@ -34,6 +35,7 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -47,6 +49,7 @@ import java.util.Map;
 /**
  * Test to check PartitionSpec support in HiveMetaStore.
  */
+@Category(MetastoreCheckinTest.class)
 public class TestHiveMetaStorePartitionSpecs {
 
   private static final Logger LOG = 
LoggerFactory.getLogger(TestHiveMetaStorePartitionSpecs.class);

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java
index 1489975..42df9c2 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTimeout.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hive.metastore;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
@@ -30,11 +31,13 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  * Test long running request timeout functionality in MetaStore Server
  * HiveMetaStore.HMSHandler.create_database() is used to simulate a long 
running method.
  */
+@Category(MetastoreCheckinTest.class)
 public class TestHiveMetaStoreTimeout {
   protected static HiveMetaStoreClient client;
   protected static Configuration conf;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java
index d4cedb0..db4dd9e 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreTxns.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.hive.metastore;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.common.ValidTxnList;
 import org.apache.hadoop.hive.common.ValidReadTxnList;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.DataOperationType;
 import org.apache.hadoop.hive.metastore.api.HeartbeatTxnRangeResponse;
 import org.apache.hadoop.hive.metastore.api.LockResponse;
@@ -30,6 +31,7 @@ import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.util.List;
 
@@ -45,6 +47,7 @@ import java.util.List;
  * required the hive-exec jar, and hive-exec jar already depends on
  * hive-metastore jar, thus I can't make hive-metastore depend on hive-exec.
  */
+@Category(MetastoreUnitTest.class)
 public class TestHiveMetaStoreTxns {
 
   private final Configuration conf = MetastoreConf.newMetastoreConf();

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
index fd75247..42e77a6 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetaStoreWithEnvironmentContext.java
@@ -24,6 +24,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.EnvironmentContext;
 import org.apache.hadoop.hive.metastore.api.Partition;
@@ -43,6 +44,7 @@ import org.apache.hadoop.hive.metastore.events.ListenerEvent;
 import org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertEquals;
 
@@ -50,6 +52,7 @@ import static org.junit.Assert.assertEquals;
  * TestHiveMetaStoreWithEnvironmentContext. Test case for 
_with_environment_context
  * calls in {@link org.apache.hadoop.hive.metastore.HiveMetaStore}
  */
+@Category(MetastoreUnitTest.class)
 public class TestHiveMetaStoreWithEnvironmentContext {
 
   private Configuration conf;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetastoreCli.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetastoreCli.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetastoreCli.java
index f1a08dd..0d10be1 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetastoreCli.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestHiveMetastoreCli.java
@@ -19,10 +19,13 @@
 package org.apache.hadoop.hive.metastore;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreUnitTest.class)
 public class TestHiveMetastoreCli {
   private static final String[] CLI_ARGUMENTS = { "9999" };
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestLockRequestBuilder.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestLockRequestBuilder.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestLockRequestBuilder.java
index a47c8a6..31284ee 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestLockRequestBuilder.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestLockRequestBuilder.java
@@ -17,12 +17,14 @@
  */
 package org.apache.hadoop.hive.metastore;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.LockComponent;
 import org.apache.hadoop.hive.metastore.api.LockLevel;
 import org.apache.hadoop.hive.metastore.api.LockRequest;
 import org.apache.hadoop.hive.metastore.api.LockType;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.net.InetAddress;
 import java.util.List;
@@ -30,6 +32,7 @@ import java.util.List;
 /**
  * Tests for LockRequestBuilder.
  */
+@Category(MetastoreUnitTest.class)
 public class TestLockRequestBuilder {
 
   // Test failure if user not set

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartition.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartition.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartition.java
index 6854a93..b477088 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartition.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartition.java
@@ -22,6 +22,7 @@ import java.util.HashMap;
 import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.InvalidPartitionException;
 import org.apache.hadoop.hive.metastore.api.Partition;
@@ -36,7 +37,9 @@ import org.apache.thrift.TException;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreCheckinTest.class)
 public class TestMarkPartition {
 
   protected Configuration conf;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java
index ac1cc4c..55f3324 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMarkPartitionRemote.java
@@ -18,11 +18,14 @@
 
 package org.apache.hadoop.hive.metastore;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
 import org.junit.Before;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreCheckinTest.class)
 public class TestMarkPartitionRemote extends TestMarkPartition {
 
   @Before

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreConnectionUrlHook.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreConnectionUrlHook.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreConnectionUrlHook.java
index 19279a5..e8d88dc 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreConnectionUrlHook.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreConnectionUrlHook.java
@@ -19,15 +19,18 @@
 package org.apache.hadoop.hive.metastore;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  * TestMetaStoreConnectionUrlHook
  * Verifies that when an instance of an implementation of RawStore is 
initialized, the connection
  * URL has already been updated by any metastore connect URL hooks.
  */
+@Category(MetastoreUnitTest.class)
 public class TestMetaStoreConnectionUrlHook {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
index 25e3a95..bfc819e 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEndFunctionListener.java
@@ -19,6 +19,7 @@
 package org.apache.hadoop.hive.metastore;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.NoSuchObjectException;
 import org.apache.hadoop.hive.metastore.api.Table;
@@ -29,6 +30,7 @@ import 
org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -38,6 +40,7 @@ import static org.junit.Assert.assertTrue;
  * TestMetaStoreEventListener. Test case for
  * {@link org.apache.hadoop.hive.metastore.MetaStoreEndFunctionListener}
  */
+@Category(MetastoreUnitTest.class)
 public class TestMetaStoreEndFunctionListener {
   private Configuration conf;
   private HiveMetaStoreClient msc;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
index 1508ee5..879e611 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
@@ -27,6 +27,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.metastore.api.Index;
@@ -79,12 +80,14 @@ import static org.junit.Assert.assertTrue;
 import com.google.common.collect.Lists;
 
 import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
 
 /**
  * TestMetaStoreEventListener. Test case for
  * {@link org.apache.hadoop.hive.metastore.MetaStoreEventListener} and
  * {@link org.apache.hadoop.hive.metastore.MetaStorePreEventListener}
  */
+@Category(MetastoreUnitTest.class)
 public class TestMetaStoreEventListener {
   private Configuration conf;
   private HiveMetaStoreClient msc;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerOnlyOnCommit.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerOnlyOnCommit.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerOnlyOnCommit.java
index de729c7..062520b 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerOnlyOnCommit.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerOnlyOnCommit.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hive.metastore;
 import java.util.List;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.Partition;
 import org.apache.hadoop.hive.metastore.api.Table;
@@ -39,10 +40,12 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
 
 /**
  * Ensure that the status of MetaStore events depend on the RawStore's commit 
status.
  */
+@Category(MetastoreUnitTest.class)
 public class TestMetaStoreEventListenerOnlyOnCommit {
 
   private Configuration conf;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerWithOldConf.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerWithOldConf.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerWithOldConf.java
index 82e39f1..a9d9e78 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerWithOldConf.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreEventListenerWithOldConf.java
@@ -29,6 +29,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.metastore.api.Index;
@@ -72,6 +73,7 @@ import 
org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
@@ -83,6 +85,7 @@ import static org.junit.Assert.assertTrue;
  * Mostly same tests as TestMetaStoreEventListener, but using old hive conf 
values instead of new
  * metastore conf values.
  */
+@Category(MetastoreUnitTest.class)
 public class TestMetaStoreEventListenerWithOldConf {
   private Configuration conf;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreInitListener.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreInitListener.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreInitListener.java
index f692b0a..fd8fde4 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreInitListener.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreInitListener.java
@@ -19,17 +19,20 @@
 package org.apache.hadoop.hive.metastore;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  * TestMetaStoreInitListener. Test case for
  * {@link org.apache.hadoop.hive.metastore.MetaStoreInitListener}
  */
+@Category(MetastoreCheckinTest.class)
 public class TestMetaStoreInitListener {
   private Configuration conf;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreListenersError.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreListenersError.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreListenersError.java
index 3fdce48..2bdf3cc 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreListenersError.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreListenersError.java
@@ -19,17 +19,20 @@
 package org.apache.hadoop.hive.metastore;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
 
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  * Test for unwrapping InvocationTargetException, which is thrown from
  * constructor of listener class
  */
+@Category(MetastoreUnitTest.class)
 public class TestMetaStoreListenersError {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreSchemaFactory.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreSchemaFactory.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreSchemaFactory.java
index f6147e5..5511a33 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreSchemaFactory.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreSchemaFactory.java
@@ -18,12 +18,15 @@
 package org.apache.hadoop.hive.metastore;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreUnitTest.class)
 public class TestMetaStoreSchemaFactory {
   private Configuration conf;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreSchemaInfo.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreSchemaInfo.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreSchemaInfo.java
index 8485e99..a756e40 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreSchemaInfo.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestMetaStoreSchemaInfo.java
@@ -18,13 +18,16 @@
 
 package org.apache.hadoop.hive.metastore;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  * Test MetaStoreSchemaInfo
  */
+@Category(MetastoreUnitTest.class)
 public class TestMetaStoreSchemaInfo {
 
   @Test

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java
index 0b7f06d..dd0d6d2 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStore.java
@@ -23,6 +23,7 @@ import com.google.common.base.Supplier;
 import com.google.common.collect.ImmutableList;
 import org.apache.hadoop.hive.metastore.ObjectStore.RetryingExecutor;
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.CurrentNotificationEventId;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
@@ -54,6 +55,7 @@ import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.mockito.Mockito;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -71,6 +73,7 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 
+@Category(MetastoreUnitTest.class)
 public class TestObjectStore {
   private ObjectStore objectStore = null;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStoreInitRetry.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStoreInitRetry.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStoreInitRetry.java
index b4e5a85..4674392 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStoreInitRetry.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestObjectStoreInitRetry.java
@@ -28,16 +28,19 @@ import java.util.concurrent.TimeUnit;
 import javax.jdo.JDOCanRetryException;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
+@Category(MetastoreCheckinTest.class)
 public class TestObjectStoreInitRetry {
   private static final Logger LOG = 
LoggerFactory.getLogger(TestObjectStoreInitRetry.class);
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestOldSchema.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestOldSchema.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestOldSchema.java
index 6a44833..f286da8 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestOldSchema.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestOldSchema.java
@@ -24,6 +24,7 @@ import java.util.List;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.hive.common.ndv.hll.HyperLogLog;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.api.AggrStats;
 import org.apache.hadoop.hive.metastore.api.ColumnStatistics;
 import org.apache.hadoop.hive.metastore.api.ColumnStatisticsData;
@@ -47,9 +48,11 @@ import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@Category(MetastoreUnitTest.class)
 public class TestOldSchema {
   private ObjectStore store = null;
 

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestPartitionNameWhitelistValidation.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestPartitionNameWhitelistValidation.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestPartitionNameWhitelistValidation.java
index 180a666..e60544b 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestPartitionNameWhitelistValidation.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestPartitionNameWhitelistValidation.java
@@ -24,14 +24,17 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreUnitTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 // Validate the metastore client call validatePartitionNameCharacters to 
ensure it throws
 // an exception if partition fields contain Unicode characters or commas
 
+@Category(MetastoreUnitTest.class)
 public class TestPartitionNameWhitelistValidation {
 
   private static final String partitionValidationPattern = 
"[\\x20-\\x7E&&[^,]]*";

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRawStoreProxy.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRawStoreProxy.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRawStoreProxy.java
index 25a6ecf..2bf5d32 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRawStoreProxy.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRawStoreProxy.java
@@ -23,10 +23,13 @@ import static org.junit.Assert.fail;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreCheckinTest.class)
 public class TestRawStoreProxy {
 
   static class TestStore extends ObjectStore {

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStore.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStore.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStore.java
index 8976474..e1f81bb 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStore.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStore.java
@@ -18,13 +18,16 @@
 
 package org.apache.hadoop.hive.metastore;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
 import org.junit.Assert;
 import org.junit.Before;
+import org.junit.experimental.categories.Category;
 
 
+@Category(MetastoreCheckinTest.class)
 public class TestRemoteHiveMetaStore extends TestHiveMetaStore {
   private static boolean isServerStarted = false;
   protected static int port;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStoreIpAddress.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStoreIpAddress.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStoreIpAddress.java
index 370cd28..e26a97d 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStoreIpAddress.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteHiveMetaStoreIpAddress.java
@@ -19,12 +19,14 @@
 package org.apache.hadoop.hive.metastore;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -35,6 +37,7 @@ import org.slf4j.LoggerFactory;
  * Test which checks that the remote Hive metastore stores the proper IP 
address using
  * IpAddressListener
  */
+@Category(MetastoreCheckinTest.class)
 public class TestRemoteHiveMetaStoreIpAddress {
   private static final Logger LOG = 
LoggerFactory.getLogger(TestRemoteHiveMetaStoreIpAddress.class);
   private static Configuration conf;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteUGIHiveMetaStoreIpAddress.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteUGIHiveMetaStoreIpAddress.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteUGIHiveMetaStoreIpAddress.java
index 92d2d0e..e0de07c 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteUGIHiveMetaStoreIpAddress.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRemoteUGIHiveMetaStoreIpAddress.java
@@ -18,8 +18,11 @@
 package org.apache.hadoop.hive.metastore;
 
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreCheckinTest.class)
 public class TestRemoteUGIHiveMetaStoreIpAddress extends 
TestRemoteHiveMetaStoreIpAddress {
   public TestRemoteUGIHiveMetaStoreIpAddress() {
     System.setProperty(MetastoreConf.ConfVars.EXECUTE_SET_UGI.toString(), 
"true");

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRetriesInRetryingHMSHandler.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRetriesInRetryingHMSHandler.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRetriesInRetryingHMSHandler.java
index 8d44bf8..23ebc6d 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRetriesInRetryingHMSHandler.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRetriesInRetryingHMSHandler.java
@@ -25,13 +25,16 @@ import java.util.concurrent.TimeUnit;
 import javax.jdo.JDOException;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.MetaException;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.mockito.Mockito;
 
+@Category(MetastoreCheckinTest.class)
 public class TestRetriesInRetryingHMSHandler {
 
   private static Configuration conf;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
index badcd60..b72cc09 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestRetryingHMSHandler.java
@@ -21,6 +21,7 @@ package org.apache.hadoop.hive.metastore;
 import java.util.concurrent.TimeUnit;
 
 import org.apache.hadoop.conf.Configuration;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.Table;
 import org.apache.hadoop.hive.metastore.client.builder.TableBuilder;
@@ -30,11 +31,13 @@ import 
org.apache.hadoop.hive.metastore.security.HadoopThriftAuthBridge;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  * TestRetryingHMSHandler. Test case for
  * {@link org.apache.hadoop.hive.metastore.RetryingHMSHandler}
  */
+@Category(MetastoreCheckinTest.class)
 public class TestRetryingHMSHandler {
   private Configuration conf;
   private HiveMetaStoreClient msc;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnBothClientServer.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnBothClientServer.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnBothClientServer.java
index e34d089..98113ae 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnBothClientServer.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnBothClientServer.java
@@ -18,8 +18,11 @@
 
 package org.apache.hadoop.hive.metastore;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreCheckinTest.class)
 public class TestSetUGIOnBothClientServer extends TestRemoteHiveMetaStore{
 
   public TestSetUGIOnBothClientServer() {

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnOnlyClient.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnOnlyClient.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnOnlyClient.java
index beff656..f2705bc 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnOnlyClient.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnOnlyClient.java
@@ -18,9 +18,12 @@
 
 package org.apache.hadoop.hive.metastore;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreCheckinTest.class)
 public class TestSetUGIOnOnlyClient extends TestRemoteHiveMetaStore{
 
   @Override

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnOnlyServer.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnOnlyServer.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnOnlyServer.java
index bec5a55..da550f6 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnOnlyServer.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/TestSetUGIOnOnlyServer.java
@@ -18,9 +18,12 @@
 
 package org.apache.hadoop.hive.metastore;
 
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.apache.hadoop.hive.metastore.conf.MetastoreConf.ConfVars;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreCheckinTest.class)
 public class TestSetUGIOnOnlyServer extends TestSetUGIOnBothClientServer {
 
   @Override

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreCheckinTest.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreCheckinTest.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreCheckinTest.java
new file mode 100644
index 0000000..f13ed74
--- /dev/null
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreCheckinTest.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore.annotation;
+
+/**
+ * Marker interface for tests run before checkin and as part of nightly 
builds.  These are
+ * generally slower unit tests that we don't want to run every time someone 
runs 'mvn test'.
+ */
+public interface MetastoreCheckinTest extends MetastoreTest {
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreTest.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreTest.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreTest.java
new file mode 100644
index 0000000..cc52de0
--- /dev/null
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreTest.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore.annotation;
+
+/**
+ * Marker interface for all Metastore unit tests.
+ */
+public interface MetastoreTest {
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreUnitTest.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreUnitTest.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreUnitTest.java
new file mode 100644
index 0000000..e712393
--- /dev/null
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/annotation/MetastoreUnitTest.java
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.hadoop.hive.metastore.annotation;
+
+/**
+ * Marker interface for all faster running metastore unit tests.  Tests (and 
only tests) marked
+ * with this interface will be run as the default for 'mvn test'.
+ */
+public interface MetastoreUnitTest extends MetastoreTest {
+}

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java
index e5207c9..0006815 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/cache/TestCachedStore.java
@@ -28,8 +28,8 @@ import org.apache.hadoop.hive.common.ndv.hll.HyperLogLog;
 import org.apache.hadoop.hive.metastore.MetaStoreTestUtils;
 import org.apache.hadoop.hive.metastore.ObjectStore;
 import org.apache.hadoop.hive.metastore.TableType;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.AggrStats;
-import org.apache.hadoop.hive.metastore.api.BasicTxnInfo;
 import org.apache.hadoop.hive.metastore.api.BooleanColumnStatsData;
 import org.apache.hadoop.hive.metastore.api.ColumnStatistics;
 import org.apache.hadoop.hive.metastore.api.ColumnStatisticsData;
@@ -49,7 +49,9 @@ import org.apache.hadoop.hive.metastore.conf.MetastoreConf;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category(MetastoreCheckinTest.class)
 public class TestCachedStore {
 
   private ObjectStore objectStore;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddAlterDropIndexes.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddAlterDropIndexes.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddAlterDropIndexes.java
index 88bacbf..ca1c003 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddAlterDropIndexes.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddAlterDropIndexes.java
@@ -25,6 +25,7 @@ import java.util.stream.Collectors;
 
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hive.metastore.IMetaStoreClient;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.AlreadyExistsException;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
@@ -47,6 +48,7 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
@@ -54,6 +56,7 @@ import org.junit.runners.Parameterized;
  * Tests for creating, altering and dropping indexes.
  */
 @RunWith(Parameterized.class)
+@Category(MetastoreCheckinTest.class)
 public class TestAddAlterDropIndexes {
   // Needed until there is no junit release with @BeforeParam, @AfterParam 
(junit 4.13)
   // 
https://github.com/junit-team/junit4/commit/1bf8438b65858565dbb64736bfe13aae9cfc1b5a

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitions.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitions.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitions.java
index 09be321..f483ca8 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitions.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAddPartitions.java
@@ -25,6 +25,7 @@ import java.util.stream.Collectors;
 
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hive.metastore.IMetaStoreClient;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.AlreadyExistsException;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
@@ -46,6 +47,7 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
@@ -55,6 +57,7 @@ import com.google.common.collect.Lists;
  * Tests for creating partitions.
  */
 @RunWith(Parameterized.class)
+@Category(MetastoreCheckinTest.class)
 public class TestAddPartitions {
 
   // Needed until there is no junit release with @BeforeParam, @AfterParam 
(junit 4.13)

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java
index dca8406..31b3154 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAlterPartitions.java
@@ -25,6 +25,7 @@ import java.util.Set;
 import java.util.stream.Collectors;
 
 import org.apache.hadoop.hive.metastore.IMetaStoreClient;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.EnvironmentContext;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
@@ -45,6 +46,7 @@ import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
@@ -59,6 +61,7 @@ import static org.junit.Assert.fail;
  * API tests for HMS client's  alterPartitions methods.
  */
 @RunWith(Parameterized.class)
+@Category(MetastoreCheckinTest.class)
 public class TestAlterPartitions {
 
   public static final int NEW_CREATE_TIME = 123456789;

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java
index d8aa5bd..cfec569 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestAppendPartitions.java
@@ -29,6 +29,7 @@ import org.apache.commons.lang.StringUtils;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hive.metastore.IMetaStoreClient;
 import org.apache.hadoop.hive.metastore.TableType;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.AlreadyExistsException;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
@@ -47,6 +48,7 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
@@ -56,6 +58,7 @@ import com.google.common.collect.Lists;
  * Tests for appending partitions.
  */
 @RunWith(Parameterized.class)
+@Category(MetastoreCheckinTest.class)
 public class TestAppendPartitions {
 
   // Needed until there is no junit release with @BeforeParam, @AfterParam 
(junit 4.13)

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDatabases.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDatabases.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDatabases.java
index db80072..b9593b4 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDatabases.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDatabases.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.hive.metastore.client;
 
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hive.metastore.IMetaStoreClient;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.AlreadyExistsException;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.Function;
@@ -42,6 +43,7 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 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.slf4j.Logger;
@@ -56,6 +58,7 @@ import java.util.stream.Collectors;
  * Test class for IMetaStoreClient API. Testing the Database related functions.
  */
 @RunWith(Parameterized.class)
+@Category(MetastoreCheckinTest.class)
 public class TestDatabases {
   private static final Logger LOG = 
LoggerFactory.getLogger(TestDatabases.class);
   // Needed until there is no junit release with @BeforeParam, @AfterParam 
(junit 4.13)

http://git-wip-us.apache.org/repos/asf/hive/blob/c4d22858/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java
----------------------------------------------------------------------
diff --git 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java
 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java
index 2ed7ec0..e550bca 100644
--- 
a/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java
+++ 
b/standalone-metastore/src/test/java/org/apache/hadoop/hive/metastore/client/TestDropPartitions.java
@@ -27,6 +27,7 @@ import java.util.stream.Collectors;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hive.metastore.IMetaStoreClient;
 import org.apache.hadoop.hive.metastore.PartitionDropOptions;
+import org.apache.hadoop.hive.metastore.annotation.MetastoreCheckinTest;
 import org.apache.hadoop.hive.metastore.api.Database;
 import org.apache.hadoop.hive.metastore.api.FieldSchema;
 import org.apache.hadoop.hive.metastore.api.MetaException;
@@ -43,6 +44,7 @@ import org.junit.AfterClass;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
@@ -52,6 +54,7 @@ import com.google.common.collect.Lists;
  * Tests for dropping partitions.
  */
 @RunWith(Parameterized.class)
+@Category(MetastoreCheckinTest.class)
 public class TestDropPartitions {
 
   // Needed until there is no junit release with @BeforeParam, @AfterParam 
(junit 4.13)

Reply via email to