accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [05/28] accumulo git commit: ACCUMULO-4423 Simplify use of JUnit categories
Date Thu, 01 Sep 2016 19:04:25 GMT
ACCUMULO-4423 Simplify use of JUnit categories

* Create surefire.groups, surefire.excludedGroups, failsafe.groups, and
  failsafe.excludedGroups to control categories, based on feedback from
  Maven developers about what to expect these property names to be in
  maven-surefire-plugin and maven-failsafe-plugin version 3.0
* Remove intermediate property names, which added unneeded level of
  property indirection (under assumption that we'll keep these
  categories stable over time, in order to keep the docs valid)
* Remove unneeded profiles
* Update documentation


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

Branch: refs/heads/1.8
Commit: 3bf084545a6b2ffd693f1323e8e72ea13478455c
Parents: dd5bd0c
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Wed Aug 31 18:04:32 2016 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Wed Aug 31 19:44:04 2016 -0400

----------------------------------------------------------------------
 TESTING.md                              |  7 ++++---
 maven-plugin/src/it/plugin-test/pom.xml | 29 +++++++++++----------------
 pom.xml                                 | 30 ++++++++--------------------
 3 files changed, 24 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bf08454/TESTING.md
----------------------------------------------------------------------
diff --git a/TESTING.md b/TESTING.md
index 125110b..4d37055 100644
--- a/TESTING.md
+++ b/TESTING.md
@@ -64,8 +64,8 @@ stopping the MiniAccumuloCluster.  While this is a surefire way to isolate
tests
 increases the actual runtime of the test by, on average, 10x. Some times the tests require
the use of MAC because the
 test is being destructive or some special environment setup (e.g. Kerberos).
 
-By default, these tests are run during the `integration-test` lifecycle phase using `mvn
verify`. These tests can
-also be run at the `test` lifecycle phase using `mvn package -Pminicluster-unit-tests`.
+These tests will run by default during the `integration-test` lifecycle phase using `mvn
verify`.
+To execute only these tests, use `mvn verify -Dfailsafe.groups=org.apache.accumulo.test.categories.MiniClusterOnlyTest`
 
 ### Standalone Cluster (`AnyClusterTest`)
 
@@ -79,7 +79,8 @@ Use of a standalone cluster can be enabled using system properties on the
Maven
 providing a Java properties file on the Maven command line. The use of a properties file
is recommended since it is
 typically a fixed file per standalone cluster you want to run the tests against.
 
-These tests will always run during the `integration-test` lifecycle phase using `mvn verify`.
+These tests will run by default during the `integration-test` lifecycle phase using `mvn
verify`.
+To execute only these tests, use `mvn verify -Dfailsafe.groups=org.apache.accumulo.test.categories.AnyClusterTest`
 
 ## Configuration for Standalone clusters
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bf08454/maven-plugin/src/it/plugin-test/pom.xml
----------------------------------------------------------------------
diff --git a/maven-plugin/src/it/plugin-test/pom.xml b/maven-plugin/src/it/plugin-test/pom.xml
index 3b0b7f7..020e170 100644
--- a/maven-plugin/src/it/plugin-test/pom.xml
+++ b/maven-plugin/src/it/plugin-test/pom.xml
@@ -94,25 +94,20 @@
     </dependency>
   </dependencies>
   <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-failsafe-plugin</artifactId>
+          <configuration>
+            <excludedGroups combine.self="override" />
+            <groups combine.self="override" />
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-failsafe-plugin</artifactId>
-        <executions>
-          <execution>
-            <id>run-integration-tests</id>
-            <goals>
-              <goal>integration-test</goal>
-              <goal>verify</goal>
-            </goals>
-            <configuration>
-              <excludedGroups combine.self="override" />
-              <groups combine.self="override" />
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
         <groupId>@project.groupId@</groupId>
         <artifactId>@project.artifactId@</artifactId>
         <version>@project.version@</version>

http://git-wip-us.apache.org/repos/asf/accumulo/blob/3bf08454/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index d6393d2..cc2b9e0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -115,10 +115,6 @@
     <url>https://builds.apache.org/view/A-D/view/Accumulo/</url>
   </ciManagement>
   <properties>
-    <accumulo.anyClusterTests>org.apache.accumulo.test.categories.AnyClusterTest</accumulo.anyClusterTests>
-    <accumulo.it.excludedGroups />
-    <accumulo.it.groups>${accumulo.anyClusterTests},${accumulo.miniclusterTests}</accumulo.it.groups>
-    <accumulo.miniclusterTests>org.apache.accumulo.test.categories.MiniClusterOnlyTest</accumulo.miniclusterTests>
     <!-- used for filtering the java source with the current version -->
     <accumulo.release.version>${project.version}</accumulo.release.version>
     <assembly.tarLongFileMode>posix</assembly.tarLongFileMode>
@@ -128,6 +124,8 @@
     <eclipseFormatterStyle>${project.parent.basedir}/contrib/Eclipse-Accumulo-Codestyle.xml</eclipseFormatterStyle>
     <!-- extra release args for testing -->
     <extraReleaseArgs />
+    <failsafe.excludedGroups />
+    <failsafe.groups />
     <!-- findbugs-maven-plugin won't work on jdk8 or later; set to 3.0.0 or newer -->
     <findbugs.version>3.0.3</findbugs.version>
     <!-- surefire/failsafe plugin option -->
@@ -151,7 +149,9 @@
     <!-- overwritten in hadoop profiles -->
     <slf4j.version>1.7.5</slf4j.version>
     <sourceReleaseAssemblyDescriptor>source-release-tar</sourceReleaseAssemblyDescriptor>
+    <surefire.excludedGroups />
     <surefire.failIfNoSpecifiedTests>false</surefire.failIfNoSpecifiedTests>
+    <surefire.groups />
     <!-- Thrift version -->
     <thrift.version>0.9.1</thrift.version>
     <!-- ZooKeeper version -->
@@ -685,6 +685,8 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
+            <excludedGroups>${surefire.excludedGroups}</excludedGroups>
+            <groups>${surefire.groups}</groups>
             <systemPropertyVariables>
               <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
             </systemPropertyVariables>
@@ -695,6 +697,8 @@
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-failsafe-plugin</artifactId>
           <configuration>
+            <excludedGroups>${failsafe.excludedGroups}</excludedGroups>
+            <groups>${failsafe.groups}</groups>
             <systemPropertyVariables>
               <java.io.tmpdir>${project.build.directory}</java.io.tmpdir>
             </systemPropertyVariables>
@@ -1010,10 +1014,6 @@
               <goal>integration-test</goal>
               <goal>verify</goal>
             </goals>
-            <configuration>
-              <excludeGroups>${accumulo.it.excludedGroups}</excludeGroups>
-              <groups>${accumulo.it.groups}</groups>
-            </configuration>
           </execution>
         </executions>
       </plugin>
@@ -1407,19 +1407,5 @@
         </pluginManagement>
       </build>
     </profile>
-    <profile>
-      <id>only-minicluster-tests</id>
-      <properties>
-        <accumulo.it.excludedGroups>${accumulo.anyClusterTests}</accumulo.it.excludedGroups>
-        <accumulo.it.groups>${accumulo.miniclusterTests}</accumulo.it.groups>
-      </properties>
-    </profile>
-    <profile>
-      <id>standalone-capable-tests</id>
-      <properties>
-        <accumulo.it.excludedGroups>${accumulo.miniclusterTests}</accumulo.it.excludedGroups>
-        <accumulo.it.groups>${accumulo.anyClusterTests}</accumulo.it.groups>
-      </properties>
-    </profile>
   </profiles>
 </project>


Mime
View raw message