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 2016/05/13 12:47:57 UTC

[12/28] incubator-tinkerpop git commit: Changed signature of `VertexTest` methods to take arguments.

Changed signature of `VertexTest` methods to take arguments.

The base class should always pass traversal parameters from the graph like these as arguments so that the language implementation doesn't have to worry about how to get the right ids or graph elements. CTR


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

Branch: refs/heads/TINKERPOP-1297
Commit: 034eb9e94e85e392df8b428f16f3a9bd2790923d
Parents: 1a8da57
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed May 11 08:36:34 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed May 11 08:36:34 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                  |  2 +-
 docs/src/upgrade/release-3.2.x-incubating.asciidoc  |  9 +++++++++
 .../traversal/step/map/GroovyVertexTest.groovy      |  8 ++++----
 .../process/traversal/step/map/VertexTest.java      | 16 ++++++++--------
 4 files changed, 22 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/034eb9e9/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 8a11124..015dcaf 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ TinkerPop 3.2.1 (NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 * Increased the testing and scope of `TraversalHelper.isLocalStarGraph()`.
+* Changed signature of `get_g_VXlistXv1_v2_v3XX_name` and `get_g_VXlistX1_2_3XX_name` of `VertexTest` to take arguments for the `Traversal` to be constructed by extending classes.
 * Added `VertexProgramInterceptor` interface as a general pattern for `GraphComputer` providers to use for bypassing `GraphComputer` semantics where appropriate.
 * Added `SparkStarBarrierInterceptor` that uses Spark DSL for local star graph traversals that end with a `ReducingBarrierStep`.
 * Added `SparkInterceptorStrategy` which identifies which interceptor to use (if any) given the submitted `VertexProgram`.
@@ -44,7 +45,6 @@ TinkerPop 3.2.1 (NOT OFFICIALLY RELEASED YET)
 * Deprecated the `ScriptExecutor` - the `-e` option to `gremlin.sh` is now handled by `Console`.
 * `Traversal` now allows cancellation with `Thread.interrupt()`.
 * Added a Gremlin language variant tutorial teaching people how to embed Gremlin in a host programming language.
-* Added precompile of ScriptInputFormat scripts to ScriptRecordReader to improve performance.
 
 [[release-3.2.0-incubating]]
 TinkerPop 3.2.0 (Release Date: April 8, 2016)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/034eb9e9/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index 83c655c..46a6ae8 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -135,6 +135,15 @@ in a future release along with the "JUnit Benchmarks" dependency.
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1294[TINKERPOP-1294]
 
+Graph Language Providers
+^^^^^^^^^^^^^^^^^^^^^^^^
+
+VertexTest Signatures
++++++++++++++++++++++
+
+The method signatures of `get_g_VXlistXv1_v2_v3XX_name` and `get_g_VXlistX1_2_3XX_name` of `VertexTest` were changed
+to take arguments for the `Traversal` to be constructed by extending classes.
+
 TinkerPop 3.2.0
 ---------------
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/034eb9e9/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
index 22451fb..451739f 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyVertexTest.groovy
@@ -31,13 +31,13 @@ public abstract class GroovyVertexTest {
     public static class Traversals extends VertexTest {
 
         @Override
-        public Traversal<Vertex, String> get_g_VXlistXv1_v2_v3XX_name() {
-            new ScriptTraversal<>(g, "gremlin-groovy", "g.V(ids).name", "ids", [convertToVertex(graph, "marko"), convertToVertex(graph, "vadas"), convertToVertex(graph, "lop")])
+        public Traversal<Vertex, String> get_g_VXlistXv1_v2_v3XX_name(final Vertex v1, final Vertex v2, final Vertex v3) {
+            new ScriptTraversal<>(g, "gremlin-groovy", "g.V(ids).name", "ids", [v1, v2, v3])
         }
 
         @Override
-        public Traversal<Vertex, String> get_g_VXlistX1_2_3XX_name() {
-            new ScriptTraversal<>(g, "gremlin-groovy", "g.V(ids).name", "ids", [convertToVertexId(graph, "marko"), convertToVertexId(graph, "vadas"), convertToVertexId(graph, "lop")])
+        public Traversal<Vertex, String> get_g_VXlistX1_2_3XX_name(final Object v1Id, final Object v2Id, final Object v3Id) {
+            new ScriptTraversal<>(g, "gremlin-groovy", "g.V(ids).name", "ids", [v1Id, v2Id, v3Id])
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/034eb9e9/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java
index a521027..7330052 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/VertexTest.java
@@ -47,9 +47,9 @@ import static org.junit.Assert.*;
 @RunWith(GremlinProcessRunner.class)
 public abstract class VertexTest extends AbstractGremlinProcessTest {
 
-    public abstract Traversal<Vertex, String> get_g_VXlistXv1_v2_v3XX_name();
+    public abstract Traversal<Vertex, String> get_g_VXlistXv1_v2_v3XX_name(final Vertex v1, final Vertex v2, final Vertex v3);
 
-    public abstract Traversal<Vertex, String> get_g_VXlistX1_2_3XX_name();
+    public abstract Traversal<Vertex, String> get_g_VXlistX1_2_3XX_name(final Object v1Id, final Object v2Id, final Object v3Id);
 
     public abstract Traversal<Vertex, Vertex> get_g_V();
 
@@ -108,7 +108,7 @@ public abstract class VertexTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_VXlistX1_2_3XX_name() {
-        final Traversal<Vertex,String> traversal = get_g_VXlistX1_2_3XX_name();
+        final Traversal<Vertex,String> traversal = get_g_VXlistX1_2_3XX_name(convertToVertexId(graph, "marko"), convertToVertexId(graph, "vadas"), convertToVertexId(graph, "lop"));
         printTraversalForm(traversal);
         checkResults(Arrays.asList("marko", "vadas", "lop"), traversal);
     }
@@ -116,7 +116,7 @@ public abstract class VertexTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_VXlistXv1_v2_v3XX_name() {
-        final Traversal<Vertex,String> traversal = get_g_VXlistXv1_v2_v3XX_name();
+        final Traversal<Vertex,String> traversal = get_g_VXlistXv1_v2_v3XX_name(convertToVertex(graph, "marko"), convertToVertex(graph, "vadas"), convertToVertex(graph, "lop"));
         printTraversalForm(traversal);
         checkResults(Arrays.asList("marko", "vadas", "lop"), traversal);
     }
@@ -542,13 +542,13 @@ public abstract class VertexTest extends AbstractGremlinProcessTest {
     public static class Traversals extends VertexTest {
 
         @Override
-        public Traversal<Vertex, String> get_g_VXlistXv1_v2_v3XX_name() {
-            return g.V(Arrays.asList(convertToVertex(graph, "marko"), convertToVertex(graph, "vadas"), convertToVertex(graph, "lop"))).values("name");
+        public Traversal<Vertex, String> get_g_VXlistXv1_v2_v3XX_name(final Vertex v1, final Vertex v2, final Vertex v3) {
+            return g.V(Arrays.asList(v1, v2, v3)).values("name");
         }
 
         @Override
-        public Traversal<Vertex, String> get_g_VXlistX1_2_3XX_name() {
-            return g.V(Arrays.asList(convertToVertexId(graph, "marko"), convertToVertexId(graph, "vadas"), convertToVertexId(graph, "lop"))).values("name");
+        public Traversal<Vertex, String> get_g_VXlistX1_2_3XX_name(final Object v1Id, final Object v2Id, final Object v3Id) {
+            return g.V(Arrays.asList(v1Id, v2Id, v3Id)).values("name");
         }
 
         @Override