Repository: accumulo Updated Branches: refs/heads/master 3e5acd5b5 -> e0ef0ca42
ACCUMULO-3929 Separate performance tests from integration tests by annotation Performance tests will not be run by default during `mvn verify`. They can be run, in addition to the normal ITs, by activating the `performanceTests` profile. Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/f599b46b Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/f599b46b Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/f599b46b Branch: refs/heads/master Commit: f599b46b80108807fb0b2441ac127454260738f6 Parents: 3e5acd5 Author: Josh Elser <els...@apache.org> Authored: Thu Jul 2 15:30:15 2015 -0400 Committer: Josh Elser <els...@apache.org> Committed: Mon Jul 6 17:08:17 2015 -0400 ---------------------------------------------------------------------- pom.xml | 35 ++++++++++++++++++++ .../accumulo/test/AssignmentThreadsIT.java | 3 ++ .../apache/accumulo/test/BalanceFasterIT.java | 3 ++ .../org/apache/accumulo/test/ManySplitIT.java | 3 ++ .../apache/accumulo/test/PerformanceTest.java | 24 ++++++++++++++ .../functional/DeleteTableDuringSplitIT.java | 3 ++ .../accumulo/test/functional/DurabilityIT.java | 3 ++ .../test/performance/RollWALPerformanceIT.java | 3 ++ trace/pom.xml | 5 +++ 9 files changed, 82 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/f599b46b/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 3f5c081..12f3ba8 100644 --- a/pom.xml +++ b/pom.xml @@ -115,6 +115,11 @@ </site> </distributionManagement> <properties> + <!-- No second group of tests run by default (performance tests). + Setting this to something that doesn't exist results in nothing being tested. --> + <accumulo.extraFailsafeGroups>no.such.tests</accumulo.extraFailsafeGroups> + <!-- Interface used to separate tests with JUnit category --> + <accumulo.performanceTests>org.apache.accumulo.test.PerformanceTest</accumulo.performanceTests> <!-- used for filtering the java source with the current version --> <accumulo.release.version>${project.version}</accumulo.release.version> <!-- bouncycastle version for test dependencies --> @@ -1137,6 +1142,9 @@ <goal>integration-test</goal> <goal>verify</goal> </goals> + <configuration> + <excludedGroups>${accumulo.performanceTests}</excludedGroups> + </configuration> </execution> </executions> </plugin> @@ -1387,5 +1395,32 @@ <slf4j.version>1.7.5</slf4j.version> </properties> </profile> + <profile> + <id>performanceTests</id> + <build> + <pluginManagement> + <plugins> + <!-- Add an additional execution for performance tests --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-failsafe-plugin</artifactId> + <executions> + <execution> + <!-- Run only the performance tests --> + <id>run-performance-tests</id> + <goals> + <goal>integration-test</goal> + <goal>verify</goal> + </goals> + <configuration> + <groups>${accumulo.performanceTests}</groups> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </pluginManagement> + </build> + </profile> </profiles> </project> http://git-wip-us.apache.org/repos/asf/accumulo/blob/f599b46b/test/src/main/java/org/apache/accumulo/test/AssignmentThreadsIT.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/AssignmentThreadsIT.java b/test/src/main/java/org/apache/accumulo/test/AssignmentThreadsIT.java index c9a83a6..5e60388 100644 --- a/test/src/main/java/org/apache/accumulo/test/AssignmentThreadsIT.java +++ b/test/src/main/java/org/apache/accumulo/test/AssignmentThreadsIT.java @@ -27,11 +27,14 @@ import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.core.util.UtilWaitThread; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.accumulo.test.functional.ConfigurableMacBase; +import org.apache.accumulo.test.PerformanceTest; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.Text; import org.junit.Test; +import org.junit.experimental.categories.Category; // ACCUMULO-1177 +@Category(PerformanceTest.class) public class AssignmentThreadsIT extends ConfigurableMacBase { @Override http://git-wip-us.apache.org/repos/asf/accumulo/blob/f599b46b/test/src/main/java/org/apache/accumulo/test/BalanceFasterIT.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/BalanceFasterIT.java b/test/src/main/java/org/apache/accumulo/test/BalanceFasterIT.java index ab70224..660051e 100644 --- a/test/src/main/java/org/apache/accumulo/test/BalanceFasterIT.java +++ b/test/src/main/java/org/apache/accumulo/test/BalanceFasterIT.java @@ -37,12 +37,15 @@ import org.apache.accumulo.core.util.UtilWaitThread; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.accumulo.test.functional.ConfigurableMacBase; import org.apache.accumulo.test.mrit.IntegrationTestMapReduce; +import org.apache.accumulo.test.PerformanceTest; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.Text; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; // ACCUMULO-2952 +@Category(PerformanceTest.class) public class BalanceFasterIT extends ConfigurableMacBase { @Override http://git-wip-us.apache.org/repos/asf/accumulo/blob/f599b46b/test/src/main/java/org/apache/accumulo/test/ManySplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/ManySplitIT.java b/test/src/main/java/org/apache/accumulo/test/ManySplitIT.java index f1a3868..cdd7223 100644 --- a/test/src/main/java/org/apache/accumulo/test/ManySplitIT.java +++ b/test/src/main/java/org/apache/accumulo/test/ManySplitIT.java @@ -35,11 +35,14 @@ import org.apache.accumulo.minicluster.ServerType; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.accumulo.test.functional.ConfigurableMacBase; import org.apache.accumulo.test.mrit.IntegrationTestMapReduce; +import org.apache.accumulo.test.PerformanceTest; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.Text; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; +@Category(PerformanceTest.class) public class ManySplitIT extends ConfigurableMacBase { final int SPLITS = 10_000; http://git-wip-us.apache.org/repos/asf/accumulo/blob/f599b46b/test/src/main/java/org/apache/accumulo/test/PerformanceTest.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/PerformanceTest.java b/test/src/main/java/org/apache/accumulo/test/PerformanceTest.java new file mode 100644 index 0000000..22fc889 --- /dev/null +++ b/test/src/main/java/org/apache/accumulo/test/PerformanceTest.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 + * + * 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 org.apache.accumulo.test; + +/** + * Annotate integration tests which test performance-related aspects of Accumulo or are sensitive to timings and hardware capabilities. + */ +public interface PerformanceTest { + +} http://git-wip-us.apache.org/repos/asf/accumulo/blob/f599b46b/test/src/main/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java b/test/src/main/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java index 7c94163..d2cf873 100644 --- a/test/src/main/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java +++ b/test/src/main/java/org/apache/accumulo/test/functional/DeleteTableDuringSplitIT.java @@ -29,11 +29,14 @@ import org.apache.accumulo.core.client.TableNotFoundException; import org.apache.accumulo.core.util.SimpleThreadPool; import org.apache.accumulo.fate.util.UtilWaitThread; import org.apache.accumulo.harness.AccumuloClusterHarness; +import org.apache.accumulo.test.PerformanceTest; import org.apache.hadoop.io.Text; import org.junit.Assert; import org.junit.Test; +import org.junit.experimental.categories.Category; // ACCUMULO-2361 +@Category(PerformanceTest.class) public class DeleteTableDuringSplitIT extends AccumuloClusterHarness { @Override http://git-wip-us.apache.org/repos/asf/accumulo/blob/f599b46b/test/src/main/java/org/apache/accumulo/test/functional/DurabilityIT.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/functional/DurabilityIT.java b/test/src/main/java/org/apache/accumulo/test/functional/DurabilityIT.java index 5c2508e..ce9ad85 100644 --- a/test/src/main/java/org/apache/accumulo/test/functional/DurabilityIT.java +++ b/test/src/main/java/org/apache/accumulo/test/functional/DurabilityIT.java @@ -36,15 +36,18 @@ import org.apache.accumulo.minicluster.ServerType; import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.accumulo.minicluster.impl.ProcessReference; import org.apache.accumulo.test.mrit.IntegrationTestMapReduce; +import org.apache.accumulo.test.PerformanceTest; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.RawLocalFileSystem; 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.Iterators; +@Category(PerformanceTest.class) public class DurabilityIT extends ConfigurableMacBase { private static final Logger log = LoggerFactory.getLogger(DurabilityIT.class); http://git-wip-us.apache.org/repos/asf/accumulo/blob/f599b46b/test/src/main/java/org/apache/accumulo/test/performance/RollWALPerformanceIT.java ---------------------------------------------------------------------- diff --git a/test/src/main/java/org/apache/accumulo/test/performance/RollWALPerformanceIT.java b/test/src/main/java/org/apache/accumulo/test/performance/RollWALPerformanceIT.java index db0e1a3..6733e4b 100644 --- a/test/src/main/java/org/apache/accumulo/test/performance/RollWALPerformanceIT.java +++ b/test/src/main/java/org/apache/accumulo/test/performance/RollWALPerformanceIT.java @@ -32,11 +32,14 @@ import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl; import org.apache.accumulo.test.continuous.ContinuousIngest; import org.apache.accumulo.test.functional.ConfigurableMacBase; import org.apache.accumulo.test.mrit.IntegrationTestMapReduce; +import org.apache.accumulo.test.PerformanceTest; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.io.Text; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.experimental.categories.Category; +@Category(PerformanceTest.class) public class RollWALPerformanceIT extends ConfigurableMacBase { @BeforeClass http://git-wip-us.apache.org/repos/asf/accumulo/blob/f599b46b/trace/pom.xml ---------------------------------------------------------------------- diff --git a/trace/pom.xml b/trace/pom.xml index 1fee1e6..481b8bc 100644 --- a/trace/pom.xml +++ b/trace/pom.xml @@ -34,5 +34,10 @@ <groupId>org.apache.htrace</groupId> <artifactId>htrace-core</artifactId> </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> </dependencies> </project>