accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [09/28] accumulo git commit: ACCUMULO-4439 Create SunnyDayTest category
Date Thu, 01 Sep 2016 19:04:29 GMT
ACCUMULO-4439 Create SunnyDayTest category


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

Branch: refs/heads/master
Commit: 775dccd1fa750c25205b7db9d25fb4b35bb414b8
Parents: 3bf0845
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Wed Aug 31 19:10:38 2016 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Thu Sep 1 13:13:50 2016 -0400

----------------------------------------------------------------------
 TESTING.md                                      | 13 ++++++++++-
 pom.xml                                         |  2 +-
 .../apache/accumulo/start/KeywordStartIT.java   |  3 +++
 .../org/apache/accumulo/test/InMemoryMapIT.java | 12 +++++++---
 .../org/apache/accumulo/test/ShellServerIT.java |  8 +++++--
 .../accumulo/test/categories/SunnyDayTests.java | 23 ++++++++++++++++++++
 .../accumulo/test/functional/ExamplesIT.java    |  4 ++++
 .../accumulo/test/functional/NativeMapIT.java   |  3 +++
 .../accumulo/test/functional/ReadWriteIT.java   |  4 ++++
 .../accumulo/test/proxy/TCompactProxyIT.java    |  7 +++---
 10 files changed, 69 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/775dccd1/TESTING.md
----------------------------------------------------------------------
diff --git a/TESTING.md b/TESTING.md
index 4d37055..709eb18 100644
--- a/TESTING.md
+++ b/TESTING.md
@@ -50,7 +50,18 @@ least 3-4GB of free memory and 10GB of free disk space.
 ## Test Categories
 
 Accumulo uses JUnit Category annotations to categorize certain integration tests based on
their runtime requirements.
-Presently there are three different categories:
+Presently there are several different categories:
+
+### SunnyDay (`SunnyDayTests`)
+
+This test category represents a minimal set of tests chosen to verify the basic
+functionality of Accumulo. These would typically be run prior to submitting a
+patch or pull request, or fixing a bug, to quickly ensure no basic functions
+were broken by the change.
+
+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.SunnyDayTests`
+To execute everything except these tests, use `mvn verify -Dfailsafe.excludedGroups=org.apache.accumulo.test.categories.SunnyDayTests`
 
 ### MiniAccumuloCluster (`MiniClusterOnlyTest`)
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/775dccd1/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index cc2b9e0..62f58bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1320,7 +1320,7 @@
       <!-- Minimal testing profile. (a.k.a. SunnyDay) -->
       <id>sunny</id>
       <properties>
-        <it.test>ReadWriteIT,SimpleProxyIT,ExamplesIT,ShellServerIT</it.test>
+        <failsafe.groups>org.apache.accumulo.test.categories.SunnyDayTests</failsafe.groups>
       </properties>
     </profile>
     <!-- profile for our default Hadoop build

http://git-wip-us.apache.org/repos/asf/accumulo/blob/775dccd1/test/src/test/java/org/apache/accumulo/start/KeywordStartIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/start/KeywordStartIT.java b/test/src/test/java/org/apache/accumulo/start/KeywordStartIT.java
index a5c28bf..4bc2b84 100644
--- a/test/src/test/java/org/apache/accumulo/start/KeywordStartIT.java
+++ b/test/src/test/java/org/apache/accumulo/start/KeywordStartIT.java
@@ -53,14 +53,17 @@ import org.apache.accumulo.server.util.LoginProperties;
 import org.apache.accumulo.server.util.ZooKeeperMain;
 import org.apache.accumulo.shell.Shell;
 import org.apache.accumulo.start.spi.KeywordExecutable;
+import org.apache.accumulo.test.categories.SunnyDayTests;
 import org.apache.accumulo.tracer.TraceServer;
 import org.apache.accumulo.tracer.TracerExecutable;
 import org.apache.accumulo.tserver.TServerExecutable;
 import org.apache.accumulo.tserver.TabletServer;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@Category(SunnyDayTests.class)
 public class KeywordStartIT {
 
   private final Logger log = LoggerFactory.getLogger(getClass());

http://git-wip-us.apache.org/repos/asf/accumulo/blob/775dccd1/test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java b/test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java
index 6eec2e8..f13cd2f 100644
--- a/test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/InMemoryMapIT.java
@@ -16,7 +16,9 @@
  */
 package org.apache.accumulo.test;
 
-import com.google.common.collect.ImmutableSet;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import java.io.File;
 import java.io.FileNotFoundException;
 import java.io.IOException;
@@ -28,6 +30,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
+
 import org.apache.accumulo.core.data.ArrayByteSequence;
 import org.apache.accumulo.core.data.ByteSequence;
 import org.apache.accumulo.core.data.Key;
@@ -35,20 +38,22 @@ import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
+import org.apache.accumulo.test.categories.SunnyDayTests;
 import org.apache.accumulo.test.functional.NativeMapIT;
 import org.apache.accumulo.tserver.InMemoryMap;
 import org.apache.accumulo.tserver.MemKey;
 import org.apache.accumulo.tserver.NativeMap;
 import org.apache.hadoop.io.Text;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
 import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.junit.rules.TemporaryFolder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.collect.ImmutableSet;
+
 /**
  * Integration Test for https://issues.apache.org/jira/browse/ACCUMULO-4148
  * <p>
@@ -64,6 +69,7 @@ import org.slf4j.LoggerFactory;
  * This test has to be an IT in accumulo-test, because libaccumulo is built in 'integration-test'
phase of accumulo-native, which currently runs right before
  * accumulo-test. The tests for DefaultMap could move to a unit test in tserver, but they
are here for convenience of viewing both at the same time.
  */
+@Category(SunnyDayTests.class)
 public class InMemoryMapIT {
 
   private static final Logger log = LoggerFactory.getLogger(InMemoryMapIT.class);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/775dccd1/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
index b7bf85b..4b7e860 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerIT.java
@@ -39,8 +39,6 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Random;
 
-import jline.console.ConsoleReader;
-
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.ClientConfiguration;
 import org.apache.accumulo.core.client.ClientConfiguration.ClientProperty;
@@ -66,6 +64,8 @@ import org.apache.accumulo.harness.MiniClusterConfigurationCallback;
 import org.apache.accumulo.harness.SharedMiniClusterIT;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.shell.Shell;
+import org.apache.accumulo.test.categories.MiniClusterOnlyTest;
+import org.apache.accumulo.test.categories.SunnyDayTests;
 import org.apache.accumulo.test.functional.SlowIterator;
 import org.apache.accumulo.tracer.TraceServer;
 import org.apache.commons.configuration.ConfigurationException;
@@ -84,12 +84,16 @@ import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Rule;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 import org.junit.rules.TestName;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterators;
 
+import jline.console.ConsoleReader;
+
+@Category({MiniClusterOnlyTest.class, SunnyDayTests.class})
 public class ShellServerIT extends SharedMiniClusterIT {
   public static class TestOutputStream extends OutputStream {
     StringBuilder sb = new StringBuilder();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/775dccd1/test/src/test/java/org/apache/accumulo/test/categories/SunnyDayTests.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/categories/SunnyDayTests.java b/test/src/test/java/org/apache/accumulo/test/categories/SunnyDayTests.java
new file mode 100644
index 0000000..2d887ea
--- /dev/null
+++ b/test/src/test/java/org/apache/accumulo/test/categories/SunnyDayTests.java
@@ -0,0 +1,23 @@
+/*
+ * 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.categories;
+
+/**
+ * Interface to be used with JUnit Category annotation to represent the integration test
is part of a minimal set of tests which should pass for basic
+ * functionality of Accumulo.
+ */
+public interface SunnyDayTests {}

http://git-wip-us.apache.org/repos/asf/accumulo/blob/775dccd1/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
index edc6aed..9ae4dfb 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ExamplesIT.java
@@ -87,6 +87,8 @@ import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl.LogWriter;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.start.Main;
 import org.apache.accumulo.test.TestIngest;
+import org.apache.accumulo.test.categories.AnyClusterTest;
+import org.apache.accumulo.test.categories.SunnyDayTests;
 import org.apache.accumulo.tracer.TraceServer;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
@@ -98,11 +100,13 @@ import org.junit.Assert;
 import org.junit.Assume;
 import org.junit.Before;
 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({AnyClusterTest.class, SunnyDayTests.class})
 public class ExamplesIT extends AccumuloClusterIT {
   private static final Logger log = LoggerFactory.getLogger(ExamplesIT.class);
   private static final BatchWriterOpts bwOpts = new BatchWriterOpts();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/775dccd1/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java b/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java
index 9175379..a690a68 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/NativeMapIT.java
@@ -39,11 +39,14 @@ import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.util.Pair;
+import org.apache.accumulo.test.categories.SunnyDayTests;
 import org.apache.accumulo.tserver.NativeMap;
 import org.apache.hadoop.io.Text;
 import org.junit.BeforeClass;
 import org.junit.Test;
+import org.junit.experimental.categories.Category;
 
+@Category(SunnyDayTests.class)
 public class NativeMapIT {
 
   private Key nk(int r) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/775dccd1/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java b/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
index a49d43c..d6af3a1 100644
--- a/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/functional/ReadWriteIT.java
@@ -89,15 +89,19 @@ import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.test.TestIngest;
 import org.apache.accumulo.test.TestMultiTableIngest;
 import org.apache.accumulo.test.VerifyIngest;
+import org.apache.accumulo.test.categories.AnyClusterTest;
+import org.apache.accumulo.test.categories.SunnyDayTests;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
 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({AnyClusterTest.class, SunnyDayTests.class})
 public class ReadWriteIT extends AccumuloClusterIT {
   private static final Logger log = LoggerFactory.getLogger(ReadWriteIT.class);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/775dccd1/test/src/test/java/org/apache/accumulo/test/proxy/TCompactProxyIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/proxy/TCompactProxyIT.java b/test/src/test/java/org/apache/accumulo/test/proxy/TCompactProxyIT.java
index b2ffbf7..a06baf8 100644
--- a/test/src/test/java/org/apache/accumulo/test/proxy/TCompactProxyIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/proxy/TCompactProxyIT.java
@@ -17,12 +17,13 @@
 package org.apache.accumulo.test.proxy;
 
 import org.apache.accumulo.harness.SharedMiniClusterIT;
+import org.apache.accumulo.test.categories.MiniClusterOnlyTest;
+import org.apache.accumulo.test.categories.SunnyDayTests;
 import org.apache.thrift.protocol.TCompactProtocol;
 import org.junit.BeforeClass;
+import org.junit.experimental.categories.Category;
 
-/**
- *
- */
+@Category({MiniClusterOnlyTest.class, SunnyDayTests.class})
 public class TCompactProxyIT extends SimpleProxyBase {
 
   @BeforeClass


Mime
View raw message