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 2021/09/09 12:39:07 UTC
[tinkerpop] branch TINKERPOP-2601 updated: TINKERPOP-2601
Introduced a limited process test suite
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch TINKERPOP-2601
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/TINKERPOP-2601 by this push:
new 256247f TINKERPOP-2601 Introduced a limited process test suite
256247f is described below
commit 256247f1f5bd1f8f3df151eaaa908a7fd8c97a0b
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Thu Sep 9 08:37:28 2021 -0400
TINKERPOP-2601 Introduced a limited process test suite
This new suite removes the duplication between gherkin and the jvm-only suite. Fixed Neo4j test runs which were failing due to GraphComputer inclusion.
---
docs/src/dev/provider/index.asciidoc | 9 +
.../apache/tinkerpop/gremlin/structure/Graph.java | 2 +
.../process/ProcessLimitedComputerSuite.java | 235 +++++++++++++++++++++
.../process/ProcessLimitedStandardSuite.java | 229 ++++++++++++++++++++
.../gremlin/hadoop/structure/HadoopGraph.java | 2 +
...t.java => HadoopGraphFeatureIntegrateTest.java} | 4 +-
.../HadoopGraphProcessStandardIntegrateTest.java | 4 +-
.../gremlin/neo4j/structure/Neo4jGraph.java | 1 +
.../gremlin/neo4j/Neo4jGraphFeatureTest.java | 7 +-
.../process/Neo4jGraphProcessStandardTest.java | 4 +-
...st.java => SparkGraphFeatureIntegrateTest.java} | 4 +-
.../gremlin/tinkergraph/structure/TinkerGraph.java | 2 +
.../process/TinkerGraphProcessStandardTest.java | 4 +-
13 files changed, 496 insertions(+), 11 deletions(-)
diff --git a/docs/src/dev/provider/index.asciidoc b/docs/src/dev/provider/index.asciidoc
index 91e40d8..8992db1 100644
--- a/docs/src/dev/provider/index.asciidoc
+++ b/docs/src/dev/provider/index.asciidoc
@@ -891,6 +891,15 @@ means it will be important to include a `io.cucumber.core.backend.ObjectFactory`
entry that registers the custom implementation. Please see the TinkerGraph test code for further information on this
approach.
+If implementing the Gherkin tests, providers can choose to opt-in to the slimmed down version of the normal JVM process
+test suite to help alleviate test duplication between the two frameworks:
+
+[source,java]
+----
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_STANDARD)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_COMPUTER)
+----
+
=== Accessibility via GremlinPlugin
image:gremlin-plugin.png[width=100,float=left] The applications distributed with TinkerPop do not distribute with
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
index a8131c1..42af032 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java
@@ -1246,6 +1246,8 @@ public interface Graph extends AutoCloseable, Host {
public static String SUITE_STRUCTURE_INTEGRATE = "org.apache.tinkerpop.gremlin.structure.StructureIntegrateSuite";
public static String SUITE_PROCESS_COMPUTER = "org.apache.tinkerpop.gremlin.process.ProcessComputerSuite";
public static String SUITE_PROCESS_STANDARD = "org.apache.tinkerpop.gremlin.process.ProcessStandardSuite";
+ public static String SUITE_PROCESS_LIMITED_COMPUTER = "org.apache.tinkerpop.gremlin.process.ProcessLimitedComputerSuite";
+ public static String SUITE_PROCESS_LIMITED_STANDARD = "org.apache.tinkerpop.gremlin.process.ProcessLimitedStandardSuite";
/**
* The test suite class to opt in to.
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedComputerSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedComputerSuite.java
new file mode 100644
index 0000000..ee77c91
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedComputerSuite.java
@@ -0,0 +1,235 @@
+/*
+ * 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.tinkerpop.gremlin.process;
+
+import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputer;
+import org.apache.tinkerpop.gremlin.process.computer.GraphComputerTest;
+import org.apache.tinkerpop.gremlin.process.computer.clone.CloneVertexProgramTest;
+import org.apache.tinkerpop.gremlin.process.computer.ranking.pagerank.PageRankVertexProgramTest;
+import org.apache.tinkerpop.gremlin.process.computer.search.path.ShortestPathVertexProgramTest;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionComputerTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.ComplexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.ChooseTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.OptionalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.UnionTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.AndTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CoinTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CyclicPathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.SampleTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.SimplePathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TailTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.CoalesceTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConnectedComponentTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConstantTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ElementMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.FoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.LoopsTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MaxTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MeanTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MinTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PeerPressureTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProfileTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProgramTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ReadTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ShortestPathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.SumTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.UnfoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ValueMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.WriteTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ExplainTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SackTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectCapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.StoreTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.TreeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.StructureStandardSuite;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * The {@code ProcessLimitedComputerSuite} is a set of tests that providers may implement in addition to the standard Gherkin
+ * feature tests. The {@link ProcessComputerSuite} contains all the tests in Gherkin and is therefore duplicative of
+ * that test set but also includes a number of tests that have not been (or cannot be) converted to Gherkin for various
+ * reasons.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class ProcessLimitedComputerSuite extends AbstractGremlinSuite {
+
+ /**
+ * This list of tests in the suite that will be executed as part of this suite.
+ */
+ private static final Class<?>[] allTests = new Class<?>[]{
+ GraphComputerTest.class,
+ MatchTest.CountMatchTraversals.class,
+ MatchTest.GreedyMatchTraversals.class,
+ ProfileTest.Traversals.class,
+ ProgramTest.Traversals.class,
+ WriteTest.Traversals.class,
+ ExplainTest.Traversals.class,
+ SideEffectTest.Traversals.class,
+ SubgraphTest.Traversals.class,
+ TreeTest.Traversals.class,
+
+ // compliance
+ ComplexTest.Traversals.class,
+ TraversalInterruptionComputerTest.class,
+
+ // algorithms
+ PageRankVertexProgramTest.class,
+ ShortestPathVertexProgramTest.class,
+ CloneVertexProgramTest.class,
+
+ // creations
+ TranslationStrategyProcessTest.class,
+
+ // decorations
+ ReadOnlyStrategyProcessTest.class,
+ SeedStrategyProcessTest.class,
+ SubgraphStrategyProcessTest.class,
+
+ // optimizations
+ IncidentToAdjacentStrategyProcessTest.class,
+ EarlyLimitStrategyProcessTest.class
+ };
+
+ /**
+ * A list of the minimum set of base tests that Gremlin flavors should implement to be compliant with Gremlin.
+ */
+ private static final Class<?>[] testsToEnforce = new Class<?>[]{
+ // branch
+ BranchTest.class,
+ ChooseTest.class,
+ OptionalTest.class,
+ LocalTest.class,
+ RepeatTest.class,
+ UnionTest.class,
+
+ // filter
+ AndTest.class,
+ CoinTest.class,
+ CyclicPathTest.class,
+ DedupTest.class,
+ FilterTest.class,
+ HasTest.class,
+ IsTest.class,
+ OrTest.class,
+ RangeTest.class,
+ SampleTest.class,
+ SimplePathTest.class,
+ TailTest.class,
+ WhereTest.class,
+
+ // map
+ CoalesceTest.class,
+ ConstantTest.class,
+ CountTest.class,
+ FlatMapTest.class,
+ ElementMapTest.class,
+ FoldTest.class,
+ MatchTest.class,
+ MathTest.class,
+ MapTest.class,
+ MaxTest.class,
+ MeanTest.class,
+ MinTest.class,
+ SumTest.class,
+ MatchTest.class,
+ OrderTest.class,
+ PageRankTest.class,
+ // PeerPressureTest.class,
+ PathTest.class,
+ ProfileTest.class,
+ ProjectTest.class,
+ ProgramTest.class,
+ PropertiesTest.class,
+ ShortestPathTest.class,
+ SelectTest.class,
+ UnfoldTest.class,
+ ValueMapTest.class,
+ VertexTest.class,
+
+ // sideEffect
+ AddEdgeTest.class,
+ AggregateTest.class,
+ GroupTest.class,
+ GroupCountTest.class,
+ InjectTest.class,
+ SackTest.class,
+ SideEffectCapTest.class,
+ SideEffectTest.class,
+ StoreTest.class,
+ SubgraphTest.class,
+ TreeTest.class
+ };
+
+ /**
+ * This constructor is used by JUnit and will run this suite with its concrete implementations of the
+ * {@code testsToEnforce}.
+ */
+ public ProcessLimitedComputerSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
+ super(klass, builder, allTests, allTests, false, TraversalEngine.Type.COMPUTER);
+ }
+
+ /**
+ * This constructor is used by Gremlin flavor implementers who supply their own implementations of the
+ * {@code testsToEnforce}.
+ */
+ public ProcessLimitedComputerSuite(final Class<?> klass, final RunnerBuilder builder, final Class<?>[] testsToExecute) throws InitializationError {
+ super(klass, builder, testsToExecute, testsToEnforce, true, TraversalEngine.Type.COMPUTER);
+ }
+}
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedStandardSuite.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedStandardSuite.java
new file mode 100644
index 0000000..1f5d6aa
--- /dev/null
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/ProcessLimitedStandardSuite.java
@@ -0,0 +1,229 @@
+/*
+ * 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.tinkerpop.gremlin.process;
+
+import org.apache.tinkerpop.gremlin.AbstractGremlinSuite;
+import org.apache.tinkerpop.gremlin.process.traversal.CoreTraversalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalEngine;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.ComplexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.ChooseTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.LocalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.OptionalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.RepeatTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.branch.UnionTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.AndTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CoinTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CyclicPathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DedupTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.HasTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.RangeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.SampleTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.SimplePathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.TailTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.filter.WhereTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddEdgeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.AddVertexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.CoalesceTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ConstantTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ElementMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.FlatMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.FoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.GraphTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.IndexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.LoopsTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MaxTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MeanTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.MinTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.OrderTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProfileTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ReadTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.SelectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.SumTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.UnfoldTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ValueMapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.WriteTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.ExplainTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SackTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectCapTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SideEffectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.StoreTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.SubgraphTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.TreeTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SubgraphStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.EarlyLimitStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.IncidentToAdjacentStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.verification.ReadOnlyStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.StructureStandardSuite;
+import org.junit.runners.model.InitializationError;
+import org.junit.runners.model.RunnerBuilder;
+
+/**
+ * The {@code ProcessLimitedComputerSuite} is a set of tests that providers may implement in addition to the standard Gherkin
+ * feature tests. The {@link ProcessStandardSuite} contains all the tests in Gherkin and is therefore duplicative of
+ * that test set but also includes a number of tests that have not been (or cannot be) converted to Gherkin for various
+ * reasons.
+ *
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class ProcessLimitedStandardSuite extends AbstractGremlinSuite {
+
+ /**
+ * This list of tests in the suite that will be executed as part of this suite.
+ */
+ private static final Class<?>[] allTests = new Class<?>[]{
+
+ MatchTest.CountMatchTraversals.class,
+ MatchTest.GreedyMatchTraversals.class,
+ ProfileTest.Traversals.class,
+ WriteTest.Traversals.class,
+ ExplainTest.Traversals.class,
+ SideEffectTest.Traversals.class,
+ SubgraphTest.Traversals.class,
+ TreeTest.Traversals.class,
+
+ // compliance
+ ComplexTest.Traversals.class,
+ CoreTraversalTest.class,
+ TraversalInterruptionTest.class,
+
+ // creations
+ TranslationStrategyProcessTest.class,
+
+ // decorations
+ ElementIdStrategyProcessTest.class,
+ EventStrategyProcessTest.class,
+ ReadOnlyStrategyProcessTest.class,
+ PartitionStrategyProcessTest.class,
+ SeedStrategyProcessTest.class,
+ SubgraphStrategyProcessTest.class,
+
+ // optimizations
+ IncidentToAdjacentStrategyProcessTest.class,
+ EarlyLimitStrategyProcessTest.class
+ };
+
+ /**
+ * A list of the minimum set of base tests that Gremlin flavors should implement to be compliant with Gremlin.
+ */
+ private static final Class<?>[] testsToEnforce = new Class<?>[]{
+ // branch
+ BranchTest.class,
+ ChooseTest.class,
+ OptionalTest.class,
+ LocalTest.class,
+ RepeatTest.class,
+ UnionTest.class,
+
+ // filter
+ AndTest.class,
+ CoinTest.class,
+ CyclicPathTest.class,
+ DedupTest.class,
+ DropTest.class,
+ FilterTest.class,
+ HasTest.class,
+ IsTest.class,
+ OrTest.class,
+ RangeTest.class,
+ SampleTest.class,
+ SimplePathTest.class,
+ TailTest.class,
+ WhereTest.class,
+
+ // map
+ AddEdgeTest.class,
+ AddVertexTest.class,
+ CoalesceTest.class,
+ ConstantTest.class,
+ CountTest.class,
+ ElementMapTest.class,
+ FlatMapTest.class,
+ FoldTest.class,
+ LoopsTest.class,
+ IndexTest.class,
+ MapTest.class,
+ MatchTest.class,
+ MathTest.class,
+ MaxTest.class,
+ MeanTest.class,
+ MinTest.class,
+ SumTest.class,
+ OrderTest.class,
+ PathTest.class,
+ PropertiesTest.class,
+ ProfileTest.class,
+ ProjectTest.class,
+ SelectTest.class,
+ VertexTest.class,
+ UnfoldTest.class,
+ ValueMapTest.class,
+
+ // sideEffect
+ AggregateTest.class,
+ GroupTest.class,
+ GroupCountTest.class,
+ InjectTest.class,
+ SackTest.class,
+ SideEffectCapTest.class,
+ SideEffectTest.class,
+ StoreTest.class,
+ SubgraphTest.class,
+ TreeTest.class,
+ };
+
+ /**
+ * This constructor is used by JUnit and will run this suite with its concrete implementations of the
+ * {@code testsToEnforce}.
+ */
+ public ProcessLimitedStandardSuite(final Class<?> klass, final RunnerBuilder builder) throws InitializationError {
+ super(klass, builder, allTests, testsToEnforce, false, TraversalEngine.Type.STANDARD);
+ }
+
+ /**
+ * This constructor is used by Gremlin flavor implementers who supply their own implementations of the
+ * {@code testsToEnforce}.
+ */
+ public ProcessLimitedStandardSuite(final Class<?> klass, final RunnerBuilder builder, final Class<?>[] testsToExecute) throws InitializationError {
+ super(klass, builder, testsToExecute, testsToEnforce, true, TraversalEngine.Type.STANDARD);
+ }
+}
diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java
index a36722a..5cfacf7 100644
--- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java
+++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/HadoopGraph.java
@@ -56,6 +56,8 @@ import java.util.stream.StreamSupport;
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_COMPUTER)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_STANDARD)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_COMPUTER)
@Graph.OptOut(
test = "org.apache.tinkerpop.gremlin.process.traversal.step.map.MatchTest$Traversals",
method = "g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__a_0sungBy_bX",
diff --git a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureIntegrateTest.java
similarity index 98%
rename from hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
rename to hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureIntegrateTest.java
index 998b6c2..a6f5450 100644
--- a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureTest.java
+++ b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/HadoopGraphFeatureIntegrateTest.java
@@ -56,7 +56,7 @@ import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
objectFactory = GuiceFactory.class,
features = { "../gremlin-test/features" },
plugin = {"pretty", "junit:target/cucumber.xml"})
-public class HadoopGraphFeatureTest {
+public class HadoopGraphFeatureIntegrateTest {
private static final String skipReasonLength = "Hadoop-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.";
private static final List<Pair<String, String>> skip = new ArrayList<Pair<String,String>>() {{
@@ -129,7 +129,7 @@ public class HadoopGraphFeatureTest {
}
private static String getWorkingDirectory() {
- return TestHelper.makeTestDataDirectory(HadoopGraphFeatureTest.class, "graph-provider-data");
+ return TestHelper.makeTestDataDirectory(HadoopGraphFeatureIntegrateTest.class, "graph-provider-data");
}
private static Map<String, Object> getBaseConfiguration(final GraphData graphData) {
diff --git a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/process/HadoopGraphProcessStandardIntegrateTest.java b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/process/HadoopGraphProcessStandardIntegrateTest.java
index 4b8375d..f73cb74 100644
--- a/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/process/HadoopGraphProcessStandardIntegrateTest.java
+++ b/hadoop-gremlin/src/test/java/org/apache/tinkerpop/gremlin/hadoop/process/HadoopGraphProcessStandardIntegrateTest.java
@@ -21,13 +21,13 @@ package org.apache.tinkerpop.gremlin.hadoop.process;
import org.apache.tinkerpop.gremlin.GraphProviderClass;
import org.apache.tinkerpop.gremlin.hadoop.HadoopGraphProvider;
import org.apache.tinkerpop.gremlin.hadoop.structure.HadoopGraph;
-import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.process.ProcessLimitedStandardSuite;
import org.junit.runner.RunWith;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
-@RunWith(ProcessStandardSuite.class)
+@RunWith(ProcessLimitedStandardSuite.class)
@GraphProviderClass(provider = HadoopGraphProvider.class, graph = HadoopGraph.class)
public class HadoopGraphProcessStandardIntegrateTest {
diff --git a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
index d62a81e..df63c97 100644
--- a/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
+++ b/neo4j-gremlin/src/main/java/org/apache/tinkerpop/gremlin/neo4j/structure/Neo4jGraph.java
@@ -56,6 +56,7 @@ import java.util.stream.Stream;
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_INTEGRATE)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_STANDARD)
@Graph.OptIn("org.apache.tinkerpop.gremlin.neo4j.NativeNeo4jSuite")
public final class Neo4jGraph implements Graph, WrappedGraph<Neo4jGraphAPI> {
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java
index 61363c0..a50f4ec 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/Neo4jGraphFeatureTest.java
@@ -50,7 +50,7 @@ import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
@RunWith(Cucumber.class)
@CucumberOptions(
- tags = "not @RemoteOnly and not @MultiMetaProperties",
+ tags = "not @RemoteOnly and not @MultiMetaProperties and not @GraphComputerOnly",
glue = { "org.apache.tinkerpop.gremlin.features" },
objectFactory = GuiceFactory.class,
features = { "../gremlin-test/features" },
@@ -104,6 +104,11 @@ public class Neo4jGraphFeatureTest {
cleanEmpty();
}
+ @Override
+ public String changePathToDataFile(final String pathToFileFromGremlin) {
+ return ".." + File.separator + pathToFileFromGremlin;
+ }
+
private static void createIndices() {
grateful.tx().readWrite();
grateful.cypher("CREATE INDEX ON :artist(name)").iterate();
diff --git a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/Neo4jGraphProcessStandardTest.java b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/Neo4jGraphProcessStandardTest.java
index 3f2e819..f39561c 100644
--- a/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/Neo4jGraphProcessStandardTest.java
+++ b/neo4j-gremlin/src/test/java/org/apache/tinkerpop/gremlin/neo4j/process/Neo4jGraphProcessStandardTest.java
@@ -21,13 +21,13 @@ package org.apache.tinkerpop.gremlin.neo4j.process;
import org.apache.tinkerpop.gremlin.GraphProviderClass;
import org.apache.tinkerpop.gremlin.neo4j.Neo4jGraphProvider;
import org.apache.tinkerpop.gremlin.neo4j.structure.Neo4jGraph;
-import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.process.ProcessLimitedStandardSuite;
import org.junit.runner.RunWith;
/**
* @author Marko A. Rodriguez (http://markorodriguez.com)
*/
-@RunWith(ProcessStandardSuite.class)
+@RunWith(ProcessLimitedStandardSuite.class)
@GraphProviderClass(provider = Neo4jGraphProvider.class, graph = Neo4jGraph.class)
public class Neo4jGraphProcessStandardTest {
}
diff --git a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureIntegrateTest.java
similarity index 99%
rename from spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
rename to spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureIntegrateTest.java
index 911aa10..50baec0 100644
--- a/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureTest.java
+++ b/spark-gremlin/src/test/java/org/apache/tinkerpop/gremlin/spark/SparkGraphFeatureIntegrateTest.java
@@ -64,7 +64,7 @@ import static org.apache.tinkerpop.gremlin.LoadGraphWith.GraphData;
objectFactory = GuiceFactory.class,
features = { "../gremlin-test/features" },
plugin = {"pretty", "junit:target/cucumber.xml"})
-public class SparkGraphFeatureTest {
+public class SparkGraphFeatureIntegrateTest {
private static final int AVAILABLE_PROCESSORS = Runtime.getRuntime().availableProcessors();
private static final String skipReasonLength = "Spark-Gremlin is OLAP-oriented and for OLTP operations, linear-scan joins are required. This particular tests takes many minutes to execute.";
@@ -169,7 +169,7 @@ public class SparkGraphFeatureTest {
}
private static String getWorkingDirectory() {
- return TestHelper.makeTestDataDirectory(SparkGraphFeatureTest.class, "graph-provider-data");
+ return TestHelper.makeTestDataDirectory(SparkGraphFeatureIntegrateTest.class, "graph-provider-data");
}
private static Map<String, Object> getBaseConfiguration(final GraphData graphData) {
diff --git a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
index 2795ae0..0343302 100644
--- a/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
+++ b/tinkergraph-gremlin/src/main/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/TinkerGraph.java
@@ -65,6 +65,8 @@ import java.util.stream.Stream;
@Graph.OptIn(Graph.OptIn.SUITE_STRUCTURE_INTEGRATE)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_STANDARD)
@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_COMPUTER)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_STANDARD)
+@Graph.OptIn(Graph.OptIn.SUITE_PROCESS_LIMITED_COMPUTER)
public final class TinkerGraph implements Graph {
static {
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessStandardTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessStandardTest.java
index abff119..54ab306 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessStandardTest.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/process/TinkerGraphProcessStandardTest.java
@@ -19,7 +19,7 @@
package org.apache.tinkerpop.gremlin.tinkergraph.process;
import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.process.ProcessLimitedStandardSuite;
import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
import org.junit.runner.RunWith;
@@ -29,7 +29,7 @@ import org.junit.runner.RunWith;
*
* @author Stephen Mallette (http://stephen.genoprime.com)
*/
-@RunWith(ProcessStandardSuite.class)
+@RunWith(ProcessLimitedStandardSuite.class)
@GraphProviderClass(provider = TinkerGraphProvider.class, graph = TinkerGraph.class)
public class TinkerGraphProcessStandardTest {
}