You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by nc...@apache.org on 2016/10/07 19:14:17 UTC

[20/32] ambari git commit: AMBARI-14439. Categorize unit tests so can run mvn test -P $PROFILE (alejandro)

AMBARI-14439. Categorize unit tests so can run mvn test -P $PROFILE (alejandro)


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

Branch: refs/heads/branch-dev-patch-upgrade
Commit: 8f8b26a1805e600bd0276733cf73aed9bc130b44
Parents: d7a914b
Author: Alejandro Fernandez <af...@hortonworks.com>
Authored: Wed Oct 5 16:14:38 2016 -0700
Committer: Alejandro Fernandez <af...@hortonworks.com>
Committed: Wed Oct 5 16:14:41 2016 -0700

----------------------------------------------------------------------
 ambari-logsearch/pom.xml                        | 13 +++
 .../ambari-metrics-timelineservice/pom.xml      |  9 ++
 ambari-metrics/pom.xml                          | 30 ++++++-
 ambari-server/pom.xml                           | 11 +++
 .../alerts/AggregateAlertListenerTest.java      |  2 +
 .../alerts/AlertDefinitionEqualityTest.java     |  2 +
 .../state/alerts/AlertDefinitionHashTest.java   |  2 +
 .../state/alerts/AlertEventPublisherTest.java   |  2 +
 .../state/alerts/AlertReceivedListenerTest.java |  2 +
 .../alerts/AlertStateChangedEventTest.java      |  2 +
 .../state/alerts/InitialAlertEventTest.java     |  2 +
 .../KerberosComponentDescriptorTest.java        |  2 +
 .../KerberosConfigurationDescriptorTest.java    |  2 +
 .../state/kerberos/KerberosDescriptorTest.java  |  2 +
 .../KerberosDescriptorUpdateHelperTest.java     |  2 +
 .../KerberosIdentityDescriptorTest.java         |  2 +
 .../kerberos/KerberosKeytabDescriptorTest.java  |  2 +
 .../KerberosPrincipalDescriptorTest.java        |  2 +
 .../kerberos/KerberosServiceDescriptorTest.java |  2 +
 .../kerberos/VariableReplacementHelperTest.java |  2 +
 .../state/stack/ConfigUpgradePackTest.java      |  2 +
 .../state/stack/ConfigUpgradeValidityTest.java  |  2 +
 .../ambari/server/state/stack/OSFamilyTest.java |  3 +
 .../server/state/stack/UpgradePackTest.java     |  2 +
 pom.xml                                         | 86 +++++++++++++++++++-
 utility/pom.xml                                 | 49 +++++++++++
 utility/src/main/java/category/AlertTest.java   | 27 ++++++
 .../main/java/category/AmbariUpgradeTest.java   | 27 ++++++
 .../src/main/java/category/BlueprintTest.java   | 27 ++++++
 utility/src/main/java/category/FastTest.java    | 27 ++++++
 .../src/main/java/category/KerberosTest.java    | 27 ++++++
 utility/src/main/java/category/MetricsTest.java | 27 ++++++
 utility/src/main/java/category/SlowTest.java    | 27 ++++++
 .../main/java/category/StackUpgradeTest.java    | 27 ++++++
 34 files changed, 451 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-logsearch/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/pom.xml b/ambari-logsearch/pom.xml
index 0445c39..a1b6c9d 100644
--- a/ambari-logsearch/pom.xml
+++ b/ambari-logsearch/pom.xml
@@ -70,6 +70,9 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <skip>${skipSurefireTests}</skip>
+
+          <!-- Each profile in the top-level pom.xml defines which test group categories to run. -->
+          <groups>${testcase.groups}</groups>
         </configuration>
       </plugin>
       <plugin>
@@ -174,4 +177,14 @@
     </plugins>
   </build>
 
+  <dependencies>
+    <!-- Dependency in order to annotate unit tests with a category. -->
+    <dependency>
+      <groupId>utility</groupId>
+      <artifactId>utility</artifactId>
+      <version>1.0.0.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
 </project>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-metrics/ambari-metrics-timelineservice/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/pom.xml b/ambari-metrics/ambari-metrics-timelineservice/pom.xml
index 87e3423..6896c6b 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/pom.xml
+++ b/ambari-metrics/ambari-metrics-timelineservice/pom.xml
@@ -239,6 +239,8 @@
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <forkMode>always</forkMode>
           <argLine>-XX:-UseSplitVerifier</argLine>
+          <!-- Each profile in the top-level pom.xml defines which test group categories to run. -->
+          <groups>${testcase.groups}</groups>
         </configuration>
       </plugin>
       <plugin>
@@ -628,6 +630,13 @@
       <scope>test</scope>
     </dependency>
 
+    <!-- Dependency in order to annotate unit tests with a category. -->
+    <dependency>
+      <groupId>utility</groupId>
+      <artifactId>utility</artifactId>
+      <version>1.0.0.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <profiles>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-metrics/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-metrics/pom.xml b/ambari-metrics/pom.xml
index 6ab8c60..2d88912 100644
--- a/ambari-metrics/pom.xml
+++ b/ambari-metrics/pom.xml
@@ -14,13 +14,15 @@
    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.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0                              http://maven.apache.org/xsd/maven-4.0.0.xsd">
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0                              http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <groupId>org.apache.ambari</groupId>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>ambari-metrics</artifactId>
   <version>2.0.0.0-SNAPSHOT</version>
   <packaging>pom</packaging>
   <modules>
+    <module>../utility</module>
     <module>ambari-metrics-common</module>
     <module>ambari-metrics-hadoop-sink</module>
     <module>ambari-metrics-flume-sink</module>
@@ -168,6 +170,9 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <skip>${skipSurefireTests}</skip>
+
+          <!-- Each profile in the top-level pom.xml defines which test group categories to run. -->
+          <groups>${testcase.groups}</groups>
         </configuration>
       </plugin>
       <plugin>
@@ -297,7 +302,28 @@
   </build>
 
   <dependencies>
+    <!-- Dependency in order to annotate unit tests with a category. -->
+    <dependency>
+      <groupId>utility</groupId>
+      <artifactId>utility</artifactId>
+      <version>1.0.0.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
-
+  <profiles>
+    <profile>
+      <id>FastTests</id>
+      <properties>
+        <testcase.groups>category.FastTest</testcase.groups>
+      </properties>
+      <dependencies>
+        <dependency>
+          <groupId>utility</groupId>
+          <artifactId>utility</artifactId>
+          <version>1.0.0.0-SNAPSHOT</version>
+        </dependency>
+      </dependencies>
+    </profile>
+  </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-server/pom.xml b/ambari-server/pom.xml
index e37accd..d3ec9ad 100644
--- a/ambari-server/pom.xml
+++ b/ambari-server/pom.xml
@@ -574,6 +574,9 @@
         <configuration>
           <skip>${skipSurefireTests}</skip>
           <argLine>-Xmx1024m -XX:MaxPermSize=512m -Xms512m</argLine>
+
+          <!-- Each profile in the top-level pom.xml defines which test group categories to run. -->
+          <groups>${testcase.groups}</groups>
         </configuration>
       </plugin>
       <plugin>
@@ -1455,6 +1458,14 @@
       <artifactId>metrics-jvm</artifactId>
       <version>3.1.0</version>
     </dependency>
+
+    <!-- Dependency in order to annotate unit tests with a category. -->
+    <dependency>
+      <groupId>utility</groupId>
+      <artifactId>utility</artifactId>
+      <version>1.0.0.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <pluginRepositories>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AggregateAlertListenerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AggregateAlertListenerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AggregateAlertListenerTest.java
index 85dedba..d53857c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AggregateAlertListenerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AggregateAlertListenerTest.java
@@ -48,10 +48,12 @@ import com.google.inject.persist.PersistService;
 import com.google.inject.util.Modules;
 
 import junit.framework.Assert;
+import org.junit.experimental.categories.Category;
 
 /**
  * Tests the {@link AlertAggregateListener}.
  */
+@Category({ category.AlertTest.class})
 public class AggregateAlertListenerTest {
 
   private Injector m_injector;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionEqualityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionEqualityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionEqualityTest.java
index 3cc84c0..1a914cd 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionEqualityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionEqualityTest.java
@@ -32,10 +32,12 @@ import org.apache.ambari.server.state.alert.ScriptSource;
 import org.apache.ambari.server.state.alert.Source;
 import org.apache.ambari.server.state.alert.SourceType;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 /**
  * Tests equality of {@link AlertDefinition} for hashing and merging purposes.
  */
+@Category({ category.AlertTest.class})
 public class AlertDefinitionEqualityTest extends TestCase {
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionHashTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionHashTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionHashTest.java
index c534c4a..7a24966 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionHashTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertDefinitionHashTest.java
@@ -62,10 +62,12 @@ import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.Module;
 import com.google.inject.util.Modules;
+import org.junit.experimental.categories.Category;
 
 /**
  * Tests for {@link AlertDefinitionHash}.
  */
+@Category({ category.AlertTest.class})
 public class AlertDefinitionHashTest extends TestCase {
 
   private AlertDefinitionHash m_hash;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java
index 76aa2e4..c511f1a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertEventPublisherTest.java
@@ -56,11 +56,13 @@ import com.google.gson.Gson;
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.persist.PersistService;
+import org.junit.experimental.categories.Category;
 
 /**
  * Tests that {@link AmbariEvent} instances are fired correctly and that alert
  * data is bootstrapped into the database.
  */
+@Category({ category.AlertTest.class})
 public class AlertEventPublisherTest {
 
   private AlertDispatchDAO dispatchDao;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertReceivedListenerTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertReceivedListenerTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertReceivedListenerTest.java
index 7aef175..1867bda 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertReceivedListenerTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertReceivedListenerTest.java
@@ -61,10 +61,12 @@ import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.persist.PersistService;
 import com.google.inject.persist.UnitOfWork;
+import org.junit.experimental.categories.Category;
 
 /**
  * Tests the {@link AlertReceivedListener}.
  */
+@Category({ category.AlertTest.class})
 public class AlertReceivedListenerTest {
 
   private static final String ALERT_DEFINITION = "alert_definition_";

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java
index 7964d14..15ffef0 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/AlertStateChangedEventTest.java
@@ -61,6 +61,7 @@ import com.google.inject.persist.PersistService;
 import com.google.inject.util.Modules;
 
 import junit.framework.Assert;
+import org.junit.experimental.categories.Category;
 
 /**
  * Tests that {@link AlertStateChangeEvent} instances cause
@@ -68,6 +69,7 @@ import junit.framework.Assert;
  * should only be created when received alerts which have a firmness of
  * {@link AlertFirmness#HARD}.
  */
+@Category({ category.AlertTest.class})
 public class AlertStateChangedEventTest extends EasyMockSupport {
 
   private AlertEventPublisher eventPublisher;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java
index fc4803b..c7a5915 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/alerts/InitialAlertEventTest.java
@@ -51,10 +51,12 @@ import com.google.inject.persist.PersistService;
 import com.google.inject.util.Modules;
 
 import junit.framework.Assert;
+import org.junit.experimental.categories.Category;
 
 /**
  * Tests that {@link InitialAlertEventTest} instances are fired correctly.
  */
+@Category({ category.AlertTest.class })
 public class InitialAlertEventTest {
 
   private AlertsDAO m_alertsDao;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosComponentDescriptorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosComponentDescriptorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosComponentDescriptorTest.java
index 201d84e..814e010 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosComponentDescriptorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosComponentDescriptorTest.java
@@ -22,6 +22,7 @@ import com.google.gson.reflect.TypeToken;
 import junit.framework.Assert;
 import org.apache.ambari.server.AmbariException;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.util.ArrayList;
 import java.util.Collection;
@@ -32,6 +33,7 @@ import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
 
+@Category({ category.KerberosTest.class})
 public class KerberosComponentDescriptorTest {
   public static final String JSON_VALUE =
       " {" +

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosConfigurationDescriptorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosConfigurationDescriptorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosConfigurationDescriptorTest.java
index 4f2a2f5..47c4f19 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosConfigurationDescriptorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosConfigurationDescriptorTest.java
@@ -22,9 +22,11 @@ import com.google.gson.reflect.TypeToken;
 import junit.framework.Assert;
 import org.apache.ambari.server.AmbariException;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.util.*;
 
+@Category({ category.KerberosTest.class})
 public class KerberosConfigurationDescriptorTest {
   private static final String JSON_SINGLE_VALUE =
       "{ \"configuration-type\": {" +

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorTest.java
index 0070e6d..9e21742 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorTest.java
@@ -21,6 +21,7 @@ import com.google.gson.*;
 import junit.framework.Assert;
 import org.apache.ambari.server.AmbariException;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.io.File;
 import java.io.IOException;
@@ -34,6 +35,7 @@ import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
 
+@Category({ category.KerberosTest.class})
 public class KerberosDescriptorTest {
   private static final KerberosDescriptorFactory KERBEROS_DESCRIPTOR_FACTORY = new KerberosDescriptorFactory();
   private static final KerberosServiceDescriptorFactory KERBEROS_SERVICE_DESCRIPTOR_FACTORY = new KerberosServiceDescriptorFactory();

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorUpdateHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorUpdateHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorUpdateHelperTest.java
index fca2f1f..3f347dc 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorUpdateHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosDescriptorUpdateHelperTest.java
@@ -38,6 +38,7 @@ import org.apache.ambari.server.state.stack.OsFamily;
 import org.easymock.EasyMock;
 import org.easymock.EasyMockSupport;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import javax.persistence.EntityManager;
 import javax.persistence.TypedQuery;
@@ -47,6 +48,7 @@ import java.util.Properties;
 import static org.easymock.EasyMock.anyString;
 import static org.easymock.EasyMock.expect;
 
+@Category({ category.KerberosTest.class})
 public class KerberosDescriptorUpdateHelperTest extends EasyMockSupport {
   private static final KerberosDescriptorFactory KERBEROS_DESCRIPTOR_FACTORY = new KerberosDescriptorFactory();
   private static final Gson GSON = new Gson();

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosIdentityDescriptorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosIdentityDescriptorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosIdentityDescriptorTest.java
index ef1c7bb..dbf090e 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosIdentityDescriptorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosIdentityDescriptorTest.java
@@ -22,12 +22,14 @@ import com.google.gson.reflect.TypeToken;
 import junit.framework.Assert;
 import org.apache.ambari.server.AmbariException;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.TreeMap;
 
+@Category({ category.KerberosTest.class})
 public class KerberosIdentityDescriptorTest {
   public static final String JSON_VALUE =
       "{" +

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosKeytabDescriptorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosKeytabDescriptorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosKeytabDescriptorTest.java
index 79350eb..5c82662 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosKeytabDescriptorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosKeytabDescriptorTest.java
@@ -22,10 +22,12 @@ import com.google.gson.reflect.TypeToken;
 import junit.framework.Assert;
 import org.apache.ambari.server.AmbariException;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.util.Map;
 import java.util.TreeMap;
 
+@Category({ category.KerberosTest.class})
 public class KerberosKeytabDescriptorTest {
   public static final String JSON_VALUE =
       "{" +

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosPrincipalDescriptorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosPrincipalDescriptorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosPrincipalDescriptorTest.java
index 635cc30..54f5c3f 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosPrincipalDescriptorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosPrincipalDescriptorTest.java
@@ -22,9 +22,11 @@ import com.google.gson.reflect.TypeToken;
 import junit.framework.Assert;
 import org.apache.ambari.server.AmbariException;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.util.*;
 
+@Category({ category.KerberosTest.class})
 public class KerberosPrincipalDescriptorTest {
   public static final String JSON_VALUE =
       "{" +

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosServiceDescriptorTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosServiceDescriptorTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosServiceDescriptorTest.java
index 9896317..fb341ca 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosServiceDescriptorTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/KerberosServiceDescriptorTest.java
@@ -21,6 +21,7 @@ import com.google.gson.Gson;
 import junit.framework.Assert;
 import org.apache.ambari.server.AmbariException;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.io.File;
 import java.io.IOException;
@@ -34,6 +35,7 @@ import java.util.Set;
 import java.util.TreeMap;
 import java.util.TreeSet;
 
+@Category({ category.KerberosTest.class})
 public class KerberosServiceDescriptorTest {
   public static final String JSON_VALUE =
       "{" +

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/VariableReplacementHelperTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/VariableReplacementHelperTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/VariableReplacementHelperTest.java
index 8be0eb9..90f7022 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/VariableReplacementHelperTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/kerberos/VariableReplacementHelperTest.java
@@ -21,10 +21,12 @@ package org.apache.ambari.server.state.kerberos;
 import junit.framework.Assert;
 import org.apache.ambari.server.AmbariException;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.util.HashMap;
 import java.util.Map;
 
+@Category({ category.KerberosTest.class})
 public class VariableReplacementHelperTest {
   VariableReplacementHelper helper = new VariableReplacementHelper();
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradePackTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradePackTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradePackTest.java
index 388a81f..27ee146 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradePackTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradePackTest.java
@@ -28,6 +28,7 @@ import org.apache.ambari.server.state.stack.upgrade.ClusterGrouping.ExecuteStage
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
 import java.util.ArrayList;
 import java.util.Arrays;
@@ -43,6 +44,7 @@ import static org.junit.Assert.*;
 /**
  * Tests for the config upgrade pack
  */
+@Category({ category.StackUpgradeTest.class})
 public class ConfigUpgradePackTest {
 
   private Injector injector;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
index bf716b7..e764781 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/ConfigUpgradeValidityTest.java
@@ -39,6 +39,7 @@ import org.apache.ambari.server.state.stack.upgrade.Task.Type;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -52,6 +53,7 @@ import junit.framework.Assert;
  * Tests that for every upgrade pack found, that all referenced configuration
  * IDs exist in the {@code config-upgrade.xml} which will be used/created.
  */
+@Category({ category.StackUpgradeTest.class})
 public class ConfigUpgradeValidityTest {
 
   private static final Logger LOG = LoggerFactory.getLogger(ConfigUpgradeValidityTest.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java
index 9654dc3..ba41687 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/OSFamilyTest.java
@@ -25,10 +25,13 @@ import junit.framework.Assert;
 import org.apache.ambari.server.orm.InMemoryDefaultTestModule;
 import org.junit.Before;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
 import java.lang.reflect.Method;
 import java.util.*;
 
 
+@Category({ category.StackUpgradeTest.class})
 public class OSFamilyTest {
    OsFamily os_family = null;
    private Injector injector;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java
index 97e50c3..6c81c61 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/state/stack/UpgradePackTest.java
@@ -58,6 +58,7 @@ 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;
 
@@ -68,6 +69,7 @@ import com.google.inject.persist.PersistService;
 /**
  * Tests for the upgrade pack
  */
+@Category({ category.StackUpgradeTest.class})
 public class UpgradePackTest {
 
   private Injector injector;

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 7ca4ba4..bd0aa7b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -516,7 +516,7 @@
         <module>ambari-client</module>
         <module>ambari-shell</module>
         <module>ambari-logsearch</module>
-      </modules>
+        </modules>
     </profile>
     <profile>
       <id>ambari-metrics</id>
@@ -542,7 +542,7 @@
         <module>ambari-agent</module>
         <module>ambari-client</module>
         <module>ambari-shell</module>
-      </modules>
+        </modules>
     </profile>
     <profile>
       <id>clover</id>
@@ -662,5 +662,87 @@ instead of a SNAPSHOT. -->
         </plugins>
       </build>
     </profile>
+
+    <!-- Start of profiles for running unit tests.
+     The category names are Java interfaces in utility/src/main/java/category/
+     The testcase.groups property contains a csv list of these categories (including the Java package name).
+
+     To run a suite of all test cases annotated with a list of categories, run the command
+     mvn test -P $PROFILE_ID
+
+     E.g.,
+     mvn test -P FastTests
+     -->
+
+    <!-- Tests are are explicitly fast. -->
+    <profile>
+      <id>FastTests</id>
+      <properties>
+        <testcase.groups>category.FastTest</testcase.groups>
+      </properties>
+    </profile>
+
+    <!-- Tests are are explicitly slow. -->
+    <profile>
+      <id>SlowTests</id>
+      <properties>
+        <testcase.groups>category.SlowTest</testcase.groups>
+      </properties>
+    </profile>
+
+    <!-- Slow tests, or tests that are not annotated. -->
+    <profile>
+      <id>NonFastTests</id>
+      <build>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-surefire-plugin</artifactId>
+            <configuration>
+              <excludedGroups>org.apache.ambari.server.FastTest</excludedGroups>
+            </configuration>
+          </plugin>
+        </plugins>
+      </build>
+    </profile>
+
+    <!-- Unit test Profiles based on features. -->
+    <profile>
+      <id>AlertTests</id>
+      <properties>
+        <testcase.groups>category.AlertTest</testcase.groups>
+      </properties>
+    </profile>
+    <profile>
+      <id>AmbariUpgradeTests</id>
+      <properties>
+        <testcase.groups>category.AmbariUpgradeTest</testcase.groups>
+      </properties>
+    </profile>
+    <profile>
+      <id>BlueprintTests</id>
+      <properties>
+        <testcase.groups>category.BlueprintTest</testcase.groups>
+      </properties>
+    </profile>
+    <profile>
+      <id>KerberosTests</id>
+      <properties>
+        <testcase.groups>category.KerberosTest</testcase.groups>
+      </properties>
+    </profile>
+    <profile>
+      <id>MetricsTests</id>
+      <properties>
+        <testcase.groups>category.MetricsTest</testcase.groups>
+      </properties>
+    </profile>
+    <profile>
+      <id>StackUpgradeTests</id>
+      <properties>
+        <testcase.groups>category.StackUpgradeTest</testcase.groups>
+      </properties>
+    </profile>
   </profiles>
+  <!-- End of profiles for running unit tests. -->
 </project>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/utility/pom.xml
----------------------------------------------------------------------
diff --git a/utility/pom.xml b/utility/pom.xml
new file mode 100644
index 0000000..9f3fe32
--- /dev/null
+++ b/utility/pom.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0"?>
+<!--
+   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
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <artifactId>utility</artifactId>
+  <groupId>utility</groupId>
+  <version>1.0.0.0-SNAPSHOT</version>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.12</version>
+      <scope>compile</scope>    <!-- has to be compile-time dependency on junit -->
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <version>3.2</version>
+        <configuration>
+          <source>1.7</source>
+          <target>1.7</target>
+          <useIncrementalCompilation>false</useIncrementalCompilation>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/utility/src/main/java/category/AlertTest.java
----------------------------------------------------------------------
diff --git a/utility/src/main/java/category/AlertTest.java b/utility/src/main/java/category/AlertTest.java
new file mode 100644
index 0000000..b6a20ec
--- /dev/null
+++ b/utility/src/main/java/category/AlertTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 category;
+
+/**
+ * Category of unit tests that can be annotated. E.g.,
+ * {@code @Category({ category.AlertTest.class}) }
+ *
+ * A Profile can have csv of categories, in order to run the unit tests like,
+ * mvn clean test -P AlertTests
+ */
+public interface AlertTest {}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/utility/src/main/java/category/AmbariUpgradeTest.java
----------------------------------------------------------------------
diff --git a/utility/src/main/java/category/AmbariUpgradeTest.java b/utility/src/main/java/category/AmbariUpgradeTest.java
new file mode 100644
index 0000000..881107a
--- /dev/null
+++ b/utility/src/main/java/category/AmbariUpgradeTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 category;
+
+/**
+ * Category of unit tests that can be annotated. E.g.,
+ * {@code @Category({ category.AmbariUpgradeTest.class}) }
+ *
+ * A Profile can have csv of categories, in order to run the unit tests like,
+ * mvn clean test -P AmbariUpgradeTests
+ */
+public interface AmbariUpgradeTest {}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/utility/src/main/java/category/BlueprintTest.java
----------------------------------------------------------------------
diff --git a/utility/src/main/java/category/BlueprintTest.java b/utility/src/main/java/category/BlueprintTest.java
new file mode 100644
index 0000000..cb7871d
--- /dev/null
+++ b/utility/src/main/java/category/BlueprintTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 category;
+
+/**
+ * Category of unit tests that can be annotated. E.g.,
+ * {@code @Category({ category.BlueprintTest.class}) }
+ *
+ * A Profile can have csv of categories, in order to run the unit tests like,
+ * mvn clean test -P BlueprintTests
+ */
+public interface BlueprintTest {}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/utility/src/main/java/category/FastTest.java
----------------------------------------------------------------------
diff --git a/utility/src/main/java/category/FastTest.java b/utility/src/main/java/category/FastTest.java
new file mode 100644
index 0000000..a0abddf
--- /dev/null
+++ b/utility/src/main/java/category/FastTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 category;
+
+/**
+ * Category of unit tests that can be annotated. E.g.,
+ * {@code @Category({ category.FastTest.class}) }
+ *
+ * A Profile can have csv of categories, in order to run the unit tests like,
+ * mvn clean test -P FastTests
+ */
+public interface FastTest {}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/utility/src/main/java/category/KerberosTest.java
----------------------------------------------------------------------
diff --git a/utility/src/main/java/category/KerberosTest.java b/utility/src/main/java/category/KerberosTest.java
new file mode 100644
index 0000000..f7cebdf
--- /dev/null
+++ b/utility/src/main/java/category/KerberosTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 category;
+
+/**
+ * Category of unit tests that can be annotated. E.g.,
+ * {@code @Category({ category.KerberosTest.class}) }
+ *
+ * A Profile can have csv of categories, in order to run the unit tests like,
+ * mvn clean test -P KerberosTests
+ */
+public interface KerberosTest {}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/utility/src/main/java/category/MetricsTest.java
----------------------------------------------------------------------
diff --git a/utility/src/main/java/category/MetricsTest.java b/utility/src/main/java/category/MetricsTest.java
new file mode 100644
index 0000000..a352ae2
--- /dev/null
+++ b/utility/src/main/java/category/MetricsTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 category;
+
+/**
+ * Category of unit tests that can be annotated. E.g.,
+ * {@code @Category({ category.MetricsTest.class}) }
+ *
+ * A Profile can have csv of categories, in order to run the unit tests like,
+ * mvn clean test -P MetricsTests
+ */
+public interface MetricsTest {}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/utility/src/main/java/category/SlowTest.java
----------------------------------------------------------------------
diff --git a/utility/src/main/java/category/SlowTest.java b/utility/src/main/java/category/SlowTest.java
new file mode 100644
index 0000000..c1025a9
--- /dev/null
+++ b/utility/src/main/java/category/SlowTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 category;
+
+/**
+ * Category of unit tests that can be annotated. E.g.,
+ * {@code @Category({ category.SlowTest.class}) }
+ *
+ * A Profile can have csv of categories, in order to run the unit tests like,
+ * mvn clean test -P SlowTests
+ */
+public interface SlowTest {}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/8f8b26a1/utility/src/main/java/category/StackUpgradeTest.java
----------------------------------------------------------------------
diff --git a/utility/src/main/java/category/StackUpgradeTest.java b/utility/src/main/java/category/StackUpgradeTest.java
new file mode 100644
index 0000000..20a1723
--- /dev/null
+++ b/utility/src/main/java/category/StackUpgradeTest.java
@@ -0,0 +1,27 @@
+/*
+ * 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
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * 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 category;
+
+/**
+ * Category of unit tests that can be annotated. E.g.,
+ * {@code @Category({ category.StackUpgradeTest.class}) }
+ *
+ * A Profile can have csv of categories, in order to run the unit tests like,
+ * mvn clean test -P StackUpgradeTests
+ */
+public interface StackUpgradeTest {}
\ No newline at end of file