You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/04/15 14:24:10 UTC

[1/6] incubator-tinkerpop git commit: TINKERPOP3-632 Enforce gremlin.tests env var in AbstractGremlinSuite

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master db11d3b75 -> 976cb5e7b


TINKERPOP3-632 Enforce gremlin.tests env var in AbstractGremlinSuite


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/4e9c94ac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/4e9c94ac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/4e9c94ac

Branch: refs/heads/master
Commit: 4e9c94ac3cc5b96117dfc2a7829d5a103e46e88c
Parents: e0574a3
Author: mhfrantz <mf...@redsealnetworks.com>
Authored: Tue Apr 14 10:11:14 2015 -0700
Committer: mhfrantz <mf...@redsealnetworks.com>
Committed: Tue Apr 14 10:11:14 2015 -0700

----------------------------------------------------------------------
 .../groovy/GroovyEnvironmentIntegrateSuite.java | 23 +++-------------
 .../GroovyEnvironmentPerformanceSuite.java      | 25 ++++-------------
 .../gremlin/groovy/GroovyEnvironmentSuite.java  | 25 ++++-------------
 .../process/GroovyProcessComputerSuite.java     |  4 +--
 .../process/GroovyProcessStandardSuite.java     |  4 +--
 .../tinkerpop/gremlin/AbstractGremlinSuite.java | 29 ++++++++++++++++++--
 .../gremlin/process/ProcessComputerSuite.java   | 21 +-------------
 .../process/ProcessPerformanceSuite.java        |  5 ++--
 .../gremlin/process/ProcessStandardSuite.java   | 21 +-------------
 .../structure/StructurePerformanceSuite.java    |  5 ++--
 .../structure/StructureStandardSuite.java       | 25 ++++-------------
 11 files changed, 58 insertions(+), 129 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentIntegrateSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentIntegrateSuite.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentIntegrateSuite.java
index 7f1daf3..f85f40d 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentIntegrateSuite.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentIntegrateSuite.java
@@ -48,31 +48,16 @@ import java.util.stream.Stream;
  */
 public class GroovyEnvironmentIntegrateSuite extends AbstractGremlinSuite {
 
-    private static final Class<?>[] allTests = new Class<?>[]{
-            GremlinGroovyScriptEngineIntegrateTest.class
-    };
-
     /**
      * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
      * as needed to enforce tests upon implementations.
      */
-    private static final Class<?>[] testsToExecute;
-
-    static {
-        final String override = System.getenv().getOrDefault("gremlin.tests", "");
-        if (override.equals(""))
-            testsToExecute = allTests;
-        else {
-            final List<String> filters = Arrays.asList(override.split(","));
-            final List<Class<?>> allowed = Stream.of(allTests)
-                    .filter(c -> filters.contains(c.getName()))
-                    .collect(Collectors.toList());
-            testsToExecute = allowed.toArray(new Class<?>[allowed.size()]);
-        }
-    }
+    private static final Class<?>[] allTests = new Class<?>[]{
+            GremlinGroovyScriptEngineIntegrateTest.class
+    };
 
     public GroovyEnvironmentIntegrateSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-        super(klass, builder, testsToExecute);
+        super(klass, builder, allTests);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentPerformanceSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentPerformanceSuite.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentPerformanceSuite.java
index 70439a3..d79ebb6 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentPerformanceSuite.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentPerformanceSuite.java
@@ -50,32 +50,17 @@ import java.util.stream.Stream;
  */
 public class GroovyEnvironmentPerformanceSuite extends AbstractGremlinSuite {
 
-    private static final Class<?>[] allTests = new Class<?>[]{
-            GremlinExecutorPerformanceTest.class,
-            SugarLoaderPerformanceTest.class
-    };
-
     /**
      * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
      * as needed to enforce tests upon implementations.
      */
-    private static final Class<?>[] testsToExecute;
-
-    static {
-        final String override = System.getenv().getOrDefault("gremlin.tests", "");
-        if (override.equals(""))
-            testsToExecute = allTests;
-        else {
-            final List<String> filters = Arrays.asList(override.split(","));
-            final List<Class<?>> allowed = Stream.of(allTests)
-                    .filter(c -> filters.contains(c.getName()))
-                    .collect(Collectors.toList());
-            testsToExecute = allowed.toArray(new Class<?>[allowed.size()]);
-        }
-    }
+    private static final Class<?>[] allTests = new Class<?>[]{
+            GremlinExecutorPerformanceTest.class,
+            SugarLoaderPerformanceTest.class
+    };
 
     public GroovyEnvironmentPerformanceSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-        super(klass, builder, testsToExecute);
+        super(klass, builder, allTests);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentSuite.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentSuite.java
index b1b4d1c..01b5280 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentSuite.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/groovy/GroovyEnvironmentSuite.java
@@ -49,6 +49,10 @@ import java.util.stream.Stream;
  */
 public class GroovyEnvironmentSuite extends AbstractGremlinSuite {
 
+    /**
+     * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
+     * as needed to enforce tests upon implementations.
+     */
     private static final Class<?>[] allTests = new Class<?>[]{
             GremlinGroovyScriptEngineOverGraphTest.class,
             GremlinExecutorOverGraphTest.class,
@@ -56,27 +60,8 @@ public class GroovyEnvironmentSuite extends AbstractGremlinSuite {
             SugarLoaderTest.class,
     };
 
-    /**
-     * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
-     * as needed to enforce tests upon implementations.
-     */
-    private static final Class<?>[] testsToExecute;
-
-    static {
-        final String override = System.getenv().getOrDefault("gremlin.tests", "");
-        if (override.equals(""))
-            testsToExecute = allTests;
-        else {
-            final List<String> filters = Arrays.asList(override.split(","));
-            final List<Class<?>> allowed = Stream.of(allTests)
-                    .filter(c -> filters.contains(c.getName()))
-                    .collect(Collectors.toList());
-            testsToExecute = allowed.toArray(new Class<?>[allowed.size()]);
-        }
-    }
-
     public GroovyEnvironmentSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-        super(klass, builder, testsToExecute);
+        super(klass, builder, allTests);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
index b5d49a5..43ceb19 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessComputerSuite.java
@@ -88,7 +88,7 @@ public class GroovyProcessComputerSuite extends ProcessComputerSuite {
      * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
      * as needed to enforce tests upon implementations.
      */
-    private static final Class<?>[] testsToExecute = new Class<?>[]{
+    private static final Class<?>[] allTests = new Class<?>[]{
 
             //branch
             GroovyBranchTest.ComputerTraversals.class,
@@ -152,7 +152,7 @@ public class GroovyProcessComputerSuite extends ProcessComputerSuite {
     };
 
     public GroovyProcessComputerSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-        super(klass, builder, testsToExecute, testsToExecute);
+        super(klass, builder, allTests, allTests);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessStandardSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessStandardSuite.java b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessStandardSuite.java
index 71e1a7b..a660f7e 100644
--- a/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessStandardSuite.java
+++ b/gremlin-groovy-test/src/main/java/org/apache/tinkerpop/gremlin/process/GroovyProcessStandardSuite.java
@@ -93,7 +93,7 @@ public class GroovyProcessStandardSuite extends ProcessStandardSuite {
      * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
      * as needed to enforce tests upon implementations.
      */
-    private static final Class<?>[] testsToExecute = new Class<?>[]{
+    private static final Class<?>[] allTests = new Class<?>[]{
             // branch
             GroovyBranchTest.StandardTraversals.class,
             GroovyChooseTest.StandardTraversals.class,
@@ -155,7 +155,7 @@ public class GroovyProcessStandardSuite extends ProcessStandardSuite {
 
 
     public GroovyProcessStandardSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-        super(klass, builder, testsToExecute, testsToExecute, true);
+        super(klass, builder, allTests, allTests, true);
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
index f988add..6a7cbd9 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
@@ -97,7 +97,7 @@ public abstract class AbstractGremlinSuite extends Suite {
         this(klass, builder, testsToExecute, testsToEnforce, gremlinFlavorSuite, TraversalEngine.Type.STANDARD);
     }
 
-    public AbstractGremlinSuite(final Class<?> klass, final RunnerBuilder builder, final Class<?>[] testsToExecute, final Class<?>[] testsToEnforce,
+    public AbstractGremlinSuite(final Class<?> klass, final RunnerBuilder builder, Class<?>[] testsToExecute, final Class<?>[] testsToEnforce,
                                 final boolean gremlinFlavorSuite, TraversalEngine.Type traversalEngineType) throws InitializationError {
         super(builder, klass, enforce(testsToExecute, testsToEnforce));
 
@@ -144,7 +144,12 @@ public abstract class AbstractGremlinSuite extends Suite {
         }
     }
 
-    private static Class<?>[] enforce(final Class<?>[] testsToExecute, final Class<?>[] testsToEnforce) {
+    private static Class<?>[] enforce(final Class<?>[] unfilteredTestsToExecute, final Class<?>[] unfilteredTestsToEnforce) {
+        // Allow env var to filter the test lists.
+        final Class<?>[] testsToExecute = filterSpecifiedTests(unfilteredTestsToExecute);
+        final Class<?>[] testsToEnforce = filterSpecifiedTests(unfilteredTestsToEnforce);
+
+        // If there are no tests specified to enforce, enforce them all.
         if (null == testsToEnforce) return testsToExecute;
 
         // examine each test to enforce and ensure an instance of it is in the list of testsToExecute
@@ -158,6 +163,26 @@ public abstract class AbstractGremlinSuite extends Suite {
         return testsToExecute;
     }
 
+    /**
+     * Filter a list of test classes through the gremlin.tests environment variable list.
+     */
+    private static Class<?>[] filterSpecifiedTests(Class<?>[] allTests) {
+        if (null == allTests) return allTests;
+
+        Class<?>[] filteredTests;
+        final String override = System.getenv().getOrDefault("gremlin.tests", "");
+        if (override.equals(""))
+            filteredTests = allTests;
+        else {
+            final List<String> filters = Arrays.asList(override.split(","));
+            final List<Class<?>> allowed = Stream.of(allTests)
+                    .filter(c -> filters.contains(c.getName()))
+                    .collect(Collectors.toList());
+            filteredTests = allowed.toArray(new Class<?>[allowed.size()]);
+        }
+        return filteredTests;
+    }
+
     public static Pair<Class<? extends GraphProvider>, Class<? extends Graph>> getGraphProviderClass(final Class<?> klass) throws InitializationError {
         final GraphProviderClass annotation = klass.getAnnotation(GraphProviderClass.class);
         if (null == annotation)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
index 498d8b0..86ab157 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessComputerSuite.java
@@ -175,27 +175,8 @@ public class ProcessComputerSuite extends AbstractGremlinSuite {
             SubgraphStrategyProcessTest.class
     };
 
-    /**
-     * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
-     * as needed to enforce tests upon implementations.
-     */
-    private static final Class<?>[] testsToExecute;
-
-    static {
-        final String override = System.getenv().getOrDefault("gremlin.tests", "");
-        if (override.equals(""))
-            testsToExecute = allTests;
-        else {
-            final List<String> filters = Arrays.asList(override.split(","));
-            final List<Class<?>> allowed = Stream.of(allTests)
-                    .filter(c -> filters.contains(c.getName()))
-                    .collect(Collectors.toList());
-            testsToExecute = allowed.toArray(new Class<?>[allowed.size()]);
-        }
-    }
-
     public ProcessComputerSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-        super(klass, builder, testsToExecute, testsToExecute, false, TraversalEngine.Type.COMPUTER);
+        super(klass, builder, allTests, allTests, false, TraversalEngine.Type.COMPUTER);
     }
 
     public ProcessComputerSuite(final Class<?> klass, final RunnerBuilder builder, final Class<?>[] testsToExecute, final Class<?>[] testsToEnforce) throws InitializationError {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessPerformanceSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessPerformanceSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessPerformanceSuite.java
index be6a3f5..e0619b1 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessPerformanceSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessPerformanceSuite.java
@@ -37,16 +37,17 @@ import org.junit.runners.model.RunnerBuilder;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public class ProcessPerformanceSuite extends AbstractGremlinSuite {
+
     /**
      * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
      * as needed to enforce tests upon implementations.
      */
-    private static final Class<?>[] testsToExecute = new Class<?>[]{
+    private static final Class<?>[] allTests = new Class<?>[]{
             TraversalPerformanceTest.class
     };
 
     public ProcessPerformanceSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-        super(klass, builder, testsToExecute);
+        super(klass, builder, allTests);
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessStandardSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessStandardSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessStandardSuite.java
index 2bed41d..645e599 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessStandardSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessStandardSuite.java
@@ -184,27 +184,8 @@ public class ProcessStandardSuite extends AbstractGremlinSuite {
             SubgraphStrategyProcessTest.class
     };
 
-    /**
-     * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
-     * as needed to enforce tests upon implementations.
-     */
-    private static final Class<?>[] testsToExecute;
-
-    static {
-        final String override = System.getenv().getOrDefault("gremlin.tests", "");
-        if (override.equals(""))
-            testsToExecute = allTests;
-        else {
-            final List<String> filters = Arrays.asList(override.split(","));
-            final List<Class<?>> allowed = Stream.of(allTests)
-                    .filter(c -> filters.contains(c.getName()))
-                    .collect(Collectors.toList());
-            testsToExecute = allowed.toArray(new Class<?>[allowed.size()]);
-        }
-    }
-
     public ProcessStandardSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-        super(klass, builder, testsToExecute, testsToExecute);
+        super(klass, builder, allTests, allTests);
     }
 
     public ProcessStandardSuite(final Class<?> klass, final RunnerBuilder builder, final Class<?>[] testsToExecute, final Class<?>[] testsToEnforce) throws InitializationError {

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructurePerformanceSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructurePerformanceSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructurePerformanceSuite.java
index 4280c6b..5ef20cc 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructurePerformanceSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructurePerformanceSuite.java
@@ -33,17 +33,18 @@ import org.junit.runners.model.RunnerBuilder;
  * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 public class StructurePerformanceSuite extends AbstractGremlinSuite {
+
     /**
      * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
      * as needed to enforce tests upon implementations.
      */
-    private static final Class<?>[] testsToExecute = new Class<?>[]{
+    private static final Class<?>[] allTests = new Class<?>[]{
             GraphWritePerformanceTest.class,
             GraphReadPerformanceTest.class
     };
 
     public StructurePerformanceSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-        super(klass, builder, testsToExecute);
+        super(klass, builder, allTests);
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4e9c94ac/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
index b6e7f73..37cbe29 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/StructureStandardSuite.java
@@ -66,6 +66,10 @@ import java.util.stream.Stream;
  */
 public class StructureStandardSuite extends AbstractGremlinSuite {
 
+    /**
+     * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
+     * as needed to enforce tests upon implementations.
+     */
     private static final Class<?>[] allTests = new Class<?>[]{
             BatchTest.class,
             CommunityGeneratorTest.class,
@@ -91,26 +95,7 @@ public class StructureStandardSuite extends AbstractGremlinSuite {
             VertexTest.class
     };
 
-    /**
-     * This list of tests in the suite that will be executed.  Gremlin developers should add to this list
-     * as needed to enforce tests upon implementations.
-     */
-    private static final Class<?>[] testsToExecute;
-
-    static {
-        final String override = System.getenv().getOrDefault("gremlin.tests", "");
-        if (override.equals(""))
-            testsToExecute = allTests;
-        else {
-            final List<String> filters = Arrays.asList(override.split(","));
-            final List<Class<?>> allowed = Stream.of(allTests)
-                    .filter(c -> filters.contains(c.getName()))
-                    .collect(Collectors.toList());
-            testsToExecute = allowed.toArray(new Class<?>[allowed.size()]);
-        }
-    }
-
     public StructureStandardSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
-        super(klass, builder, testsToExecute);
+        super(klass, builder, allTests);
     }
 }


[5/6] incubator-tinkerpop git commit: Merge branch 'TINKERPOP3-632-gremlin.tests-env-var' of https://github.com/RedSeal-co/incubator-tinkerpop

Posted by sp...@apache.org.
Merge branch 'TINKERPOP3-632-gremlin.tests-env-var' of https://github.com/RedSeal-co/incubator-tinkerpop


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/2fd05984
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/2fd05984
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/2fd05984

Branch: refs/heads/master
Commit: 2fd0598482316f676d3f19dd866a772d23fb30f3
Parents: db11d3b 5d8224a
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Apr 15 07:59:03 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Apr 15 07:59:03 2015 -0400

----------------------------------------------------------------------
 README.asciidoc                                 |  8 +++++-
 .../groovy/GroovyEnvironmentIntegrateSuite.java | 23 +++-------------
 .../GroovyEnvironmentPerformanceSuite.java      | 25 ++++-------------
 .../gremlin/groovy/GroovyEnvironmentSuite.java  | 25 ++++-------------
 .../process/GroovyProcessComputerSuite.java     |  4 +--
 .../process/GroovyProcessStandardSuite.java     |  4 +--
 .../tinkerpop/gremlin/AbstractGremlinSuite.java | 29 ++++++++++++++++++--
 .../gremlin/process/ProcessComputerSuite.java   | 21 +-------------
 .../process/ProcessPerformanceSuite.java        |  5 ++--
 .../gremlin/process/ProcessStandardSuite.java   | 21 +-------------
 .../structure/StructurePerformanceSuite.java    |  5 ++--
 .../structure/StructureStandardSuite.java       | 25 ++++-------------
 12 files changed, 65 insertions(+), 130 deletions(-)
----------------------------------------------------------------------



[3/6] incubator-tinkerpop git commit: Update instructions for running selected tests

Posted by sp...@apache.org.
Update instructions for running selected tests


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/5675fed9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/5675fed9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/5675fed9

Branch: refs/heads/master
Commit: 5675fed98512a6a5fcecce77abe509fb09ef2937
Parents: 6556e19
Author: mhfrantz <mf...@redsealnetworks.com>
Authored: Tue Apr 14 10:28:20 2015 -0700
Committer: mhfrantz <mf...@redsealnetworks.com>
Committed: Tue Apr 14 10:57:01 2015 -0700

----------------------------------------------------------------------
 README.asciidoc | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5675fed9/README.asciidoc
----------------------------------------------------------------------
diff --git a/README.asciidoc b/README.asciidoc
index 8b0373e..e0d3948 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -31,7 +31,13 @@ Building and Testing
 ~~~~~~~~~~~~~~~~~~~~
 
 * Build Project: `mvn clean install`
-** Specify specific tests in a TinkerPop Suite to run: `mvn test -Dgremlin.tests={test class 1, test class 2...}` - note that including a specific test may require its inner class implementation (e.g. `org.apache.tinkerpop.gremlin....UnionTest$ComputerTest`)
+** Specify specific tests in a TinkerPop Suite to run with the `gremlin_tests` environment variable, along with the Maven project list argument, e.g.:
++
+----
+export gremlin_tests='org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest$Traversals,org.apache.tinkerpop.gremlin.process.traversal.step.util.PathTest'
+mvn -Dmaven.javadoc.skip=true --projects tinkergraph-gremlin test
+----
+*** Including a specific test may require its inner class implementation (e.g. `org.apache.tinkerpop.gremlin....UnionTest$ComputerTest`).
 ** Clean the `.groovy/grapes/org.apache.tinkerpop` directory on build: `mvn clean install -DcleanGrapes`
 * Regenerate test data (only necessary given changes to IO classes): `mvn clean install -Dio` from `tinkergraph-gremlin` directory
 * Check license headers are present: `mvn apache-rat:check`


[6/6] incubator-tinkerpop git commit: Removed line regarding referencing a specific test case.

Posted by sp...@apache.org.
Removed line regarding referencing a specific test case.

It is implied in the example code above.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/976cb5e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/976cb5e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/976cb5e7

Branch: refs/heads/master
Commit: 976cb5e7bcefe885deaecba27d011be5b68b57d4
Parents: 2fd0598
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Apr 15 08:23:35 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Apr 15 08:23:35 2015 -0400

----------------------------------------------------------------------
 README.asciidoc | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/976cb5e7/README.asciidoc
----------------------------------------------------------------------
diff --git a/README.asciidoc b/README.asciidoc
index 92d966c..d3d81b8 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -37,7 +37,6 @@ Building and Testing
 export GREMLIN_TESTS='org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest$Traversals,org.apache.tinkerpop.gremlin.process.traversal.step.util.PathTest'
 mvn -Dmaven.javadoc.skip=true --projects tinkergraph-gremlin test
 ----
-*** Including a specific test may require its inner class implementation (e.g. `org.apache.tinkerpop.gremlin....UnionTest$ComputerTest`).
 ** Clean the `.groovy/grapes/org.apache.tinkerpop` directory on build: `mvn clean install -DcleanGrapes`
 * Regenerate test data (only necessary given changes to IO classes): `mvn clean install -Dio` from `tinkergraph-gremlin` directory
 * Check license headers are present: `mvn apache-rat:check`


[2/6] incubator-tinkerpop git commit: Change gremlin.tests to gremlin_tests

Posted by sp...@apache.org.
Change gremlin.tests to gremlin_tests

Bash env var names in the "export" syntax must be alphanumeric plus underscore.
Workarounds involving "env" syntax are cumbersome.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/6556e191
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/6556e191
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/6556e191

Branch: refs/heads/master
Commit: 6556e1918750850fcd23fae918fa9b73e98531a9
Parents: 4e9c94a
Author: mhfrantz <mf...@redsealnetworks.com>
Authored: Tue Apr 14 10:18:29 2015 -0700
Committer: mhfrantz <mf...@redsealnetworks.com>
Committed: Tue Apr 14 10:18:29 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/6556e191/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
index 6a7cbd9..c3edeed 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
@@ -164,13 +164,13 @@ public abstract class AbstractGremlinSuite extends Suite {
     }
 
     /**
-     * Filter a list of test classes through the gremlin.tests environment variable list.
+     * Filter a list of test classes through the gremlin_tests environment variable list.
      */
     private static Class<?>[] filterSpecifiedTests(Class<?>[] allTests) {
         if (null == allTests) return allTests;
 
         Class<?>[] filteredTests;
-        final String override = System.getenv().getOrDefault("gremlin.tests", "");
+        final String override = System.getenv().getOrDefault("gremlin_tests", "");
         if (override.equals(""))
             filteredTests = allTests;
         else {


[4/6] incubator-tinkerpop git commit: Use GREMLIN_TESTS because uppercase env var is more normal

Posted by sp...@apache.org.
Use GREMLIN_TESTS because uppercase env var is more normal


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/5d8224a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/5d8224a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/5d8224a8

Branch: refs/heads/master
Commit: 5d8224a8bf75ec760bf8bfebeeaeff16e9b28f9c
Parents: 5675fed
Author: mhfrantz <mf...@redsealnetworks.com>
Authored: Tue Apr 14 22:10:31 2015 -0700
Committer: mhfrantz <mf...@redsealnetworks.com>
Committed: Tue Apr 14 22:10:31 2015 -0700

----------------------------------------------------------------------
 README.asciidoc                                                  | 4 ++--
 .../java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5d8224a8/README.asciidoc
----------------------------------------------------------------------
diff --git a/README.asciidoc b/README.asciidoc
index e0d3948..92d966c 100644
--- a/README.asciidoc
+++ b/README.asciidoc
@@ -31,10 +31,10 @@ Building and Testing
 ~~~~~~~~~~~~~~~~~~~~
 
 * Build Project: `mvn clean install`
-** Specify specific tests in a TinkerPop Suite to run with the `gremlin_tests` environment variable, along with the Maven project list argument, e.g.:
+** Specify specific tests in a TinkerPop Suite to run with the `GREMLIN_TESTS` environment variable, along with the Maven project list argument, e.g.:
 +
 ----
-export gremlin_tests='org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest$Traversals,org.apache.tinkerpop.gremlin.process.traversal.step.util.PathTest'
+export GREMLIN_TESTS='org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest$Traversals,org.apache.tinkerpop.gremlin.process.traversal.step.util.PathTest'
 mvn -Dmaven.javadoc.skip=true --projects tinkergraph-gremlin test
 ----
 *** Including a specific test may require its inner class implementation (e.g. `org.apache.tinkerpop.gremlin....UnionTest$ComputerTest`).

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5d8224a8/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
index c3edeed..4d0cfa6 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/AbstractGremlinSuite.java
@@ -164,13 +164,13 @@ public abstract class AbstractGremlinSuite extends Suite {
     }
 
     /**
-     * Filter a list of test classes through the gremlin_tests environment variable list.
+     * Filter a list of test classes through the GREMLIN_TESTS environment variable list.
      */
     private static Class<?>[] filterSpecifiedTests(Class<?>[] allTests) {
         if (null == allTests) return allTests;
 
         Class<?>[] filteredTests;
-        final String override = System.getenv().getOrDefault("gremlin_tests", "");
+        final String override = System.getenv().getOrDefault("GREMLIN_TESTS", "");
         if (override.equals(""))
             filteredTests = allTests;
         else {