tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject tinkerpop git commit: added a test case to WhereTest using withSideEffects after a report that Gremlin-Python failed on it. The test case verifies that the traversal is no longer a problem -- most likely indirectly fixed during the recent Gremlin-Python
Date Mon, 28 Nov 2016 18:04:50 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/tp32 b84d653e4 -> 8a5c45b23


added a test case to WhereTest using withSideEffects after a report that Gremlin-Python failed
on it. The test case verifies that the traversal is no longer a problem -- most likely indirectly
fixed during the recent Gremlin-Python GraphSON serializer work. Fixed TINKERPOP-1567


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

Branch: refs/heads/tp32
Commit: 8a5c45b231c96e123345bc60702f9793f6434248
Parents: b84d653
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Mon Nov 28 11:04:44 2016 -0700
Committer: Marko A. Rodriguez <okrammarko@gmail.com>
Committed: Mon Nov 28 11:04:44 2016 -0700

----------------------------------------------------------------------
 .../traversal/step/filter/GroovyWhereTest.groovy     |  6 ++++++
 .../process/traversal/step/filter/WhereTest.java     | 15 +++++++++++++++
 2 files changed, 21 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8a5c45b2/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/filter/GroovyWhereTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/filter/GroovyWhereTest.groovy
b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/filter/GroovyWhereTest.groovy
index 02bf5ef..5a40b69 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/filter/GroovyWhereTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/filter/GroovyWhereTest.groovy
@@ -60,6 +60,12 @@ public abstract class GroovyWhereTest {
         /// where(global)
 
         @Override
+        public Traversal<Vertex, String> get_g_withSideEffectXa_josh_peterX_VX1X_outXcreatedX_inXcreatedX_name_whereXwithinXaXX(
+                final Object v1Id) {
+            new ScriptTraversal<>(g, "gremlin-groovy", "g.withSideEffect('a', ['josh','peter']).V(v1Id).out('created').in('created').name.where(within('a'))",
"v1Id", v1Id)
+        }
+
+        @Override
         public Traversal<Vertex, String> get_g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_neqXbXX_name(
                 final Object v1Id) {
             new ScriptTraversal<>(g, "gremlin-groovy", "g.V(v1Id).as('a').out('created').in('created').as('b').where('a',
neq('b')).name", "v1Id", v1Id)

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/8a5c45b2/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
index c9a25ad..af46bc9 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/WhereTest.java
@@ -75,6 +75,8 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
 
     /// where(global)
 
+    public abstract Traversal<Vertex, String> get_g_withSideEffectXa_josh_peterX_VX1X_outXcreatedX_inXcreatedX_name_whereXwithinXaXX(final
Object v1Id);
+
     public abstract Traversal<Vertex, String> get_g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_neqXbXX_name(final
Object v1Id);
 
     public abstract Traversal<Vertex, Object> get_g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXasXbX_outXcreatedX_hasXname_rippleXX_valuesXage_nameX(final
Object v1Id);
@@ -218,6 +220,14 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
+    public void g_withSideEffectXa_josh_peterX_VX1X_outXcreatedX_inXcreatedX_name_whereXwithinXaXX()
{
+        final Traversal<Vertex, String> traversal = get_g_withSideEffectXa_josh_peterX_VX1X_outXcreatedX_inXcreatedX_name_whereXwithinXaXX(convertToVertexId(graph,
"marko"));
+        printTraversalForm(traversal);
+        checkResults(Arrays.asList("josh", "peter"), traversal);
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
     public void g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_neqXbXX_name() {
         final Traversal<Vertex, String> traversal = get_g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_neqXbXX_name(convertToVertexId(graph,
"marko"));
         printTraversalForm(traversal);
@@ -429,6 +439,11 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
         /// where(global)
 
         @Override
+        public Traversal<Vertex, String> get_g_withSideEffectXa_josh_peterX_VX1X_outXcreatedX_inXcreatedX_name_whereXwithinXaXX(final
Object v1Id) {
+            return g.withSideEffect("a", Arrays.asList("josh", "peter")).V(v1Id).out("created").in("created").<String>values("name").where(P.within("a"));
+        }
+
+        @Override
         public Traversal<Vertex, String> get_g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_neqXbXX_name(final
Object v1Id) {
             return g.V(v1Id).as("a").out("created").in("created").as("b").where("a", neq("b")).values("name");
         }


Mime
View raw message