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 2018/02/20 19:06:52 UTC

[01/27] tinkerpop git commit: TINKERPOP-1857 Added full coverage of order() GLV tests

Repository: tinkerpop
Updated Branches:
  refs/heads/master 90437441e -> 1c49c274f


TINKERPOP-1857 Added full coverage of order() GLV tests


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

Branch: refs/heads/master
Commit: 314481e5e7410cdd6812a5095f3db6e705ec7f81
Parents: 2735643
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 6 08:04:10 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/map/Order.feature         | 193 +++++++++++++++++++
 .../gremlin/process/FeatureCoverageTest.java    |   4 +-
 2 files changed, 196 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/314481e5/gremlin-test/features/map/Order.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Order.feature b/gremlin-test/features/map/Order.feature
index 976906f..e7ff00c 100644
--- a/gremlin-test/features/map/Order.feature
+++ b/gremlin-test/features/map/Order.feature
@@ -130,3 +130,196 @@ Feature: Step - order()
       | m[{"a":"v[peter]","b":"v[lop]"}] |
       | m[{"a":"v[josh]","b":"v[ripple]"}] |
       | m[{"a":"v[josh]","b":"v[lop]"}] |
+
+  Scenario: g_V_both_hasLabelXpersonX_order_byXage_decrX_limitX5X_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().both().hasLabel("person").order().by("age", Order.decr).limit(5).values("name")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | peter  |
+      | josh  |
+      | josh  |
+      | josh |
+      | marko  |
+
+  Scenario: g_V_properties_order_byXkey_decrX_key
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().properties().order().by(T.key, Order.decr).key()
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | name   |
+      | name   |
+      | name   |
+      | name   |
+      | name   |
+      | name   |
+      | lang   |
+      | lang   |
+      | age    |
+      | age    |
+      | age    |
+      | age    |
+
+  Scenario: g_V_hasLabelXpersonX_order_byXvalueXageX__decrX_name
+    Given the modern graph
+    And using the parameter l1 defined as "c[it.value('age')]"
+    And the traversal of
+      """
+      g.V().hasLabel("person").order().by(l1, Order.decr).values("name")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | peter  |
+      | josh   |
+      | marko  |
+      | vadas  |
+
+  Scenario: g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").group().by("name").by(__.outE().values("weight").sum()).order(Scope.local).by(Column.values)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | m[{"vadas":"d[0].d","peter":"d[0.2].d","josh":"d[1.4].d","marko":"d[1.9].d"}] |
+
+  Scenario: g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().local(__.bothE().values("weight").fold()).order().by(__.sum(Scope.local), Order.decr)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | l[d[1.0].f,d[0.4].f,d[1.0].f] |
+      | l[d[0.4].f,d[0.5].f,d[1.0].f] |
+      | l[d[0.4].f,d[0.4].f,d[0.2].f] |
+      | l[d[1.0].f]                   |
+      | l[d[0.5].f]                   |
+      | l[d[0.2].f]                   |
+
+  Scenario: g_V_group_byXlabelX_byXname_order_byXdecrX_foldX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().group().by(T.label).by(__.values("name").order().by(Order.decr).fold())
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | m[{"software":"l[ripple,lop]","person":"l[vadas,peter,marko,josh]"}]  |
+
+  Scenario: g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").group().by("name").by(__.outE().values("weight").sum()).unfold().order().by(Column.values, Order.decr)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | m[{"marko":"d[1.9].d"}]  |
+      | m[{"josh":"d[1.4].d"}]  |
+      | m[{"peter":"d[0.2].d"}]  |
+      | m[{"vadas":"d[0].d"}]  |
+
+  Scenario: g_V_asXvX_mapXbothE_weight_foldX_sumXlocalX_asXsX_selectXv_sX_order_byXselectXsX_decrX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("v").map(__.bothE().values("weight").fold()).sum(Scope.local).as("s").select("v", "s").order().by(__.select("s"), Order.decr)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | m[{"v":"v[josh]","s":"d[2.4].d"}]  |
+      | m[{"v":"v[marko]","s":"d[1.9].d"}]  |
+      | m[{"v":"v[lop]","s":"d[1.0].d"}]  |
+      | m[{"v":"v[ripple]","s":"d[1.0].d"}]  |
+      | m[{"v":"v[vadas]","s":"d[0.5].d"}]  |
+      | m[{"v":"v[peter]","s":"d[0.2].d"}]  |
+
+  Scenario: g_V_hasLabelXpersonX_fold_orderXlocalX_byXageX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").fold().order(Scope.local).by("age")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | l[v[vadas],v[marko],v[josh],v[peter]] |
+
+  Scenario: g_V_both_hasLabelXpersonX_order_byXage_decrX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().both().hasLabel("person").order().by("age", Order.decr).values("name")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | peter  |
+      | josh   |
+      | josh   |
+      | josh   |
+      | marko  |
+      | marko  |
+      | marko  |
+      | vadas  |
+
+  Scenario: g_V_order_byXoutE_count__decrX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().order().by(__.outE().count(), Order.decr)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | v[marko] |
+      | v[josh]   |
+      | v[peter] |
+      | v[vadas] |
+      | v[lop] |
+      | v[ripple] |
+
+  Scenario: g_V_hasLabelXpersonX_order_byXageX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("person").order().by("age")
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | v[vadas] |
+      | v[marko] |
+      | v[josh]   |
+      | v[peter] |
+
+  Scenario: g_VX1X_hasXlabel_personX_mapXmapXint_ageXX_orderXlocalX_byXvalues_decrX_byXkeys_incrX
+    Given the modern graph
+    And using the parameter v1 defined as "v[marko]"
+    And using the parameter l1 defined as "c[[1:it.get().value('age'),2:it.get().value('age')*2,3:it.get().value('age')*3,4:it.get().value('age')]]"
+    And the traversal of
+      """
+      g.V(v1).hasLabel("person").map(l1).order(Scope.local).by(Column.values, Order.decr).by(Column.keys, Order.incr)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | m[{"3":"d[87].i","2":"d[58].i","1":"d[29].i","4":"d[29].i"}] |
+

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/314481e5/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 48c64b9..b2a83d7 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -113,7 +113,9 @@ public class FeatureCoverageTest {
             "g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__b_followedBy_c__c_writtenBy_d__whereXd_neqXaXXX",
             "g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_dX_whereXc_sungBy_dX_whereXd_hasXname_GarciaXX",
             "get_g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
-            "g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count");
+            "g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
+            "g_V_hasXsong_name_OHBOYX_outXfollowedByX_outXfollowedByX_order_byXperformancesX_byXsongType_incrX",
+            "g_V_hasLabelXsongX_order_byXperfomances_decrX_byXnameX_rangeX110_120X_name");
 
     @Test
     // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")


[12/27] tinkerpop git commit: TINKERPOP-1857 Added more has() tests to the GLV suite.

Posted by sp...@apache.org.
TINKERPOP-1857 Added more has() tests to the GLV suite.

Fixed some consistency problems in the java test itself.


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

Branch: refs/heads/master
Commit: e74747d35861ff8a2a5c2c5fc6003de01179d7ad
Parents: 1f2530e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 28 15:05:07 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/filter/Has.feature        | 315 ++++++++++++++++++-
 .../process/traversal/step/filter/HasTest.java  |  37 ++-
 2 files changed, 340 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e74747d3/gremlin-test/features/filter/Has.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Has.feature b/gremlin-test/features/filter/Has.feature
index bdede6d..f3ef5a0 100644
--- a/gremlin-test/features/filter/Has.feature
+++ b/gremlin-test/features/filter/Has.feature
@@ -17,6 +17,82 @@
 
 Feature: Step - has()
 
+  Scenario: g_V_outXcreatedX_hasXname__mapXlengthX_isXgtX3XXX_name
+    Given the modern graph
+    And using the parameter l1 defined as "c[it.get().length()]"
+    And the traversal of
+      """
+      g.V().out("created").has("name", __.map(l1).is(P.gt(3))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | ripple |
+
+  Scenario: g_VX1X_hasXnameX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).has("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+
+  Scenario: g_VX1X_hasXcircumferenceX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).has("circumference")
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_VX1X_hasXname_markoX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).has("name", "marko")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+
+  Scenario: g_VX2X_hasXname_markoX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[vadas].id"
+    And the traversal of
+      """
+      g.V(v1Id).has("name", "marko")
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_hasXname_markoX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().has("name", "marko")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+
+  Scenario: g_V_hasXname_blahX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().has("name", "blah")
+      """
+    When iterated to list
+    Then the result should be empty
+
   Scenario: g_V_hasXage_gt_30X
     Given the modern graph
     And the traversal of
@@ -29,12 +105,247 @@ Feature: Step - has()
       | v[josh] |
       | v[peter] |
 
+  Scenario: g_V_hasXage_isXgt_30XX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().has("age", __.is(P.gt(30)))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[josh] |
+      | v[peter] |
+
+  Scenario: g_VX1X_hasXage_gt_30X
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).has("age", P.gt(30))
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_VX2X_hasXage_gt_30X
+    Given the modern graph
+    And using the parameter v2Id defined as "v[josh].id"
+    And the traversal of
+      """
+      g.V(v2Id).has("age", P.gt(30))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[josh] |
+
+  Scenario: g_VXv1X_hasXage_gt_30X
+    Given the modern graph
+    And using the parameter v1 defined as "v[marko]"
+    And the traversal of
+      """
+      g.V(v1).has("age", P.gt(30))
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_VXv2X_hasXage_gt_30X
+    Given the modern graph
+    And using the parameter v2 defined as "v[josh]"
+    And the traversal of
+      """
+      g.V(v2).has("age", P.gt(30))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[josh] |
+
+  Scenario: g_VX1X_out_hasIdX2X
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter v2Id defined as "v[vadas].id"
+    And the traversal of
+      """
+      g.V(v1Id).out().hasId(v2Id)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[vadas] |
+
+  Scenario: g_VX1X_out_hasXid_2AsString_3AsStringX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].sid"
+    And using the parameter v2Id defined as "v[vadas].sid"
+    And using the parameter v3Id defined as "v[lop].sid"
+    And the traversal of
+      """
+      g.V(v1Id).out().hasId(v2Id, v3Id)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[vadas] |
+      | v[lop] |
+
+  Scenario: g_V_hasXblahX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().has("blah")
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_EX7X_hasXlabelXknowsX
+    Given the modern graph
+    And using the parameter e7Id defined as "e[marko-knows->vadas].id"
+    And the traversal of
+      """
+      g.E(e7Id).hasLabel("knows")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | e[marko-knows->vadas] |
+
+  Scenario: g_E_hasXlabelXknowsX
+    Given the modern graph
+    And the traversal of
+      """
+      g.E().hasLabel("knows")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | e[marko-knows->vadas] |
+      | e[marko-knows->josh] |
+
+  Scenario: g_E_hasLabelXuses_traversesX
+    Given the crew graph
+    And the traversal of
+      """
+      g.E().hasLabel("uses", "traverses")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | e[marko-uses->gremlin] |
+      | e[marko-uses->tinkergraph] |
+      | e[stephen-uses->gremlin] |
+      | e[stephen-uses->tinkergraph] |
+      | e[daniel-uses->gremlin] |
+      | e[daniel-uses->tinkergraph] |
+      | e[matthias-uses->gremlin] |
+      | e[matthias-uses->tinkergraph] |
+      | e[gremlin-traverses->tinkergraph] |
+
+  Scenario: g_V_hasLabelXperson_software_blahX
+    Given the modern graph
+    And the traversal of
+    """
+    g.V().hasLabel("person","software", "blah")
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+      | v[vadas] |
+      | v[josh] |
+      | v[peter] |
+      | v[lop] |
+      | v[ripple] |
+
+  Scenario: g_V_hasXperson_name_markoX_age
+    Given the modern graph
+    And the traversal of
+    """
+    g.V().has("person", "name", "marko").values("age")
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[29].i |
+
+  Scenario: g_VX1X_outE_hasXweight_inside_0_06X_inV
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter lower defined as "d[0.0].d"
+    And using the parameter upper defined as "d[0.6].d"
+    And the traversal of
+    """
+    g.V(v1Id).outE().has("weight", P.inside(lower, upper)).inV()
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[vadas] |
+      | v[lop] |
+
+  Scenario: g_EX11X_outV_outE_hasXid_10X
+    Given the modern graph
+    And using the parameter e11Id defined as "e[josh-created->lop].id"
+    And using the parameter e10Id defined as "e[josh-created->ripple].id"
+    And the traversal of
+    """
+    g.E(e11Id).outV().outE().has(T.id, e10Id)
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | e[josh-created->ripple] |
+
+  Scenario: g_EX11X_outV_outE_hasXid_10AsStringX
+    Given the modern graph
+    And using the parameter e11Id defined as "e[josh-created->lop].sid"
+    And using the parameter e10Id defined as "e[josh-created->ripple].sid"
+    And the traversal of
+    """
+    g.E(e11Id).outV().outE().has(T.id, e10Id)
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | e[josh-created->ripple] |
+
+  Scenario: g_V_hasXlocationX
+    Given the crew graph
+    And the traversal of
+    """
+    g.V().has("location")
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+      | v[matthias] |
+      | v[stephen] |
+      | v[daniel] |
+
+  Scenario: g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name
+    Given the modern graph
+    And using the parameter d10 defined as "d[10].i"
+    And using the parameter d11 defined as "d[11].i"
+    And using the parameter d20 defined as "d[20].i"
+    And using the parameter d29 defined as "d[29].i"
+    And using the parameter d35 defined as "d[35].i"
+    And the traversal of
+    """
+    g.V().hasLabel("person").has("age", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values("name")
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | vadas |
+      | peter |
+
   Scenario: g_V_in_hasIdXneqX1XX
     Given the modern graph
-    And using the parameter v1 defined as "v[marko].id"
+    And using the parameter v1Id defined as "v[marko].id"
     And the traversal of
     """
-    g.V().in().hasId(P.neq(v1))
+    g.V().in().hasId(P.neq(v1Id))
     """
     When iterated to list
     Then the result should be unordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e74747d3/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
index a5f4a62..9071d7e 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
@@ -135,13 +135,17 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_VX1X_hasXkeyX() {
-        Traversal<Vertex, Vertex> traversal = get_g_VX1X_hasXkeyX(convertToVertexId("marko"), "name");
+    public void g_VX1X_hasXnameX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_VX1X_hasXkeyX(convertToVertexId("marko"), "name");
         printTraversalForm(traversal);
         assertEquals("marko", traversal.next().<String>value("name"));
         assertFalse(traversal.hasNext());
-        //
-        traversal = get_g_VX1X_hasXkeyX(convertToVertexId("marko"), "circumference");
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_VX1X_hasXcircumferenceX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_VX1X_hasXkeyX(convertToVertexId("marko"), "circumference");
         printTraversalForm(traversal);
         assertFalse(traversal.hasNext());
     }
@@ -149,11 +153,16 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_VX1X_hasXname_markoX() {
-        Traversal<Vertex, Vertex> traversal = get_g_VX1X_hasXname_markoX(convertToVertexId("marko"));
+        final Traversal<Vertex, Vertex> traversal = get_g_VX1X_hasXname_markoX(convertToVertexId("marko"));
         printTraversalForm(traversal);
         assertEquals("marko", traversal.next().<String>value("name"));
         assertFalse(traversal.hasNext());
-        traversal = get_g_VX1X_hasXname_markoX(convertToVertexId("vadas"));
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_VX2X_hasXname_markoX() {
+        final Traversal<Vertex, Vertex> traversal = get_g_VX1X_hasXname_markoX(convertToVertexId("vadas"));
         printTraversalForm(traversal);
         assertFalse(traversal.hasNext());
     }
@@ -205,6 +214,11 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
         final Traversal<Vertex, Vertex> traversalMarko = get_g_VX1X_hasXage_gt_30X(convertToVertexId("marko"));
         printTraversalForm(traversalMarko);
         assertFalse(traversalMarko.hasNext());
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_VX2X_hasXage_gt_30X() {
         final Traversal<Vertex, Vertex> traversalJosh = get_g_VX1X_hasXage_gt_30X(convertToVertexId("josh"));
         printTraversalForm(traversalJosh);
         assertTrue(traversalJosh.hasNext());
@@ -216,6 +230,11 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
         final Traversal<Vertex, Vertex> traversalMarko = get_g_VXv1X_hasXage_gt_30X(convertToVertexId("marko"));
         printTraversalForm(traversalMarko);
         assertFalse(traversalMarko.hasNext());
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_VXv2X_hasXage_gt_30X() {
         final Traversal<Vertex, Vertex> traversalJosh = get_g_VXv1X_hasXage_gt_30X(convertToVertexId("josh"));
         printTraversalForm(traversalJosh);
         assertTrue(traversalJosh.hasNext());
@@ -283,7 +302,6 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_V_hasXblahX() {
-        //assumeTrue(graphMeetsTestRequirements());
         final Traversal<Vertex, Vertex> traversal = get_g_V_hasXblahX();
         printTraversalForm(traversal);
         assertFalse(traversal.hasNext());
@@ -293,7 +311,6 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_EX7X_hasXlabelXknowsX() {
-        //System.out.println(convertToEdgeId("marko", "knows", "vadas"));
         final Traversal<Edge, Edge> traversal = get_g_EX7X_hasLabelXknowsX(convertToEdgeId("marko", "knows", "vadas"));
         printTraversalForm(traversal);
         int counter = 0;
@@ -532,8 +549,8 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     public static class Traversals extends HasTest {
         @Override
-        public Traversal<Edge, Edge> get_g_EX11X_outV_outE_hasXid_10X(final Object e11Id, final Object e8Id) {
-            return g.E(e11Id).outV().outE().has(T.id, e8Id);
+        public Traversal<Edge, Edge> get_g_EX11X_outV_outE_hasXid_10X(final Object e11Id, final Object e10Id) {
+            return g.E(e11Id).outV().outE().has(T.id, e10Id);
         }
 
         @Override


[26/27] tinkerpop git commit: Merge branch 'TINKERPOP-1857' into tp32

Posted by sp...@apache.org.
Merge branch 'TINKERPOP-1857' into tp32


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

Branch: refs/heads/master
Commit: d42d54d6afbcb8fb8187a6472eccfe1b41d53d1b
Parents: 545f3bf 7212253
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 13:46:53 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 13:46:53 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                |  24 +-
 .../Gherkin/IgnoreException.cs                  |   6 +-
 .../Gherkin/ScenarioData.cs                     |   2 +-
 .../step/map/GroovyAddVertexTest.groovy         |   5 -
 .../lib/driver/driver-remote-connection.js      |  35 ++
 .../test/cucumber/feature-steps.js              |   7 +
 .../gremlin-javascript/test/cucumber/world.js   |   2 +-
 gremlin-python/glv/TraversalSource.template     |  14 +-
 .../jython/gremlin_python/process/traversal.py  |  14 +-
 .../src/main/jython/radish/feature_steps.py     | 101 +++-
 .../src/main/jython/radish/terrain.py           |  11 +-
 .../src/test/scripts/generate-all.groovy        |   4 +-
 .../src/test/scripts/test-server-start.groovy   |   2 +
 gremlin-test/features/branch/Repeat.feature     |  16 +
 gremlin-test/features/branch/Union.feature      |  16 +-
 gremlin-test/features/filter/Filter.feature     |  24 +
 gremlin-test/features/filter/Has.feature        | 479 ++++++++++++++++++-
 gremlin-test/features/filter/Range.feature      |   4 +-
 gremlin-test/features/filter/Where.feature      | 221 +++++++++
 gremlin-test/features/map/AddVertex.feature     | 165 ++++++-
 gremlin-test/features/map/Match.feature         | 315 ++++++++++++
 gremlin-test/features/map/Min.feature           |  11 +
 gremlin-test/features/map/Order.feature         | 193 ++++++++
 gremlin-test/features/map/Properties.feature    |  16 +-
 gremlin-test/features/map/Select.feature        | 195 +++++++-
 gremlin-test/features/sideEffect/Inject.feature |  17 +
 gremlin-test/features/sideEffect/Sack.feature   |  42 +-
 .../features/sideEffect/SideEffectCap.feature   |   8 +-
 .../traversal/step/branch/LocalTest.java        |   2 +-
 .../traversal/step/branch/RepeatTest.java       |   2 +-
 .../traversal/step/branch/UnionTest.java        |   4 +-
 .../process/traversal/step/filter/AndTest.java  |   4 +-
 .../traversal/step/filter/FilterTest.java       |   9 +-
 .../process/traversal/step/filter/HasTest.java  |  43 +-
 .../traversal/step/filter/WhereTest.java        |  10 +-
 .../traversal/step/map/AddVertexTest.java       |  27 +-
 .../process/traversal/step/map/MatchTest.java   |   4 +-
 .../process/traversal/step/map/SelectTest.java  |   2 +-
 .../gremlin/process/FeatureCoverageTest.java    | 120 ++++-
 39 files changed, 2030 insertions(+), 146 deletions(-)
----------------------------------------------------------------------



[06/27] tinkerpop git commit: TINKERPOP-1857 Generation of P for python was incorrect

Posted by sp...@apache.org.
TINKERPOP-1857 Generation of P for python was incorrect

The template was generating not() bytecode with the python naming of not_(). There were also duplicate functions in the template that needed to be removed.


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

Branch: refs/heads/master
Commit: c06e8a26be0bcf9a9749a6f812a13f5840deb25c
Parents: e96a2a6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 28 15:00:54 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-python/glv/TraversalSource.template           | 14 ++++----------
 .../main/jython/gremlin_python/process/traversal.py   | 14 ++++----------
 2 files changed, 8 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c06e8a26/gremlin-python/glv/TraversalSource.template
----------------------------------------------------------------------
diff --git a/gremlin-python/glv/TraversalSource.template b/gremlin-python/glv/TraversalSource.template
index 66ea940..b6f5b9f 100644
--- a/gremlin-python/glv/TraversalSource.template
+++ b/gremlin-python/glv/TraversalSource.template
@@ -112,26 +112,20 @@ class P(object):
         self.operator = operator
         self.value = value
         self.other = other
-
 <% pmethods.each { method -> %>
     @staticmethod
     def <%= method %>(*args):
-        return P("<%= toPython.call(method) %>", *args)
+        return P("<%= toJava.call(method) %>", *args)
 <% } %>
     def and_(self, arg):
         return P("and", self, arg)
+
     def or_(self, arg):
         return P("or", self, arg)
+
     def __eq__(self, other):
         return isinstance(other, self.__class__) and self.operator == other.operator and self.value == other.value and self.other == other.other
-    def __repr__(self):
-        return self.operator + "(" + str(self.value) + ")" if self.other is None else self.operator + "(" + str(self.value) + "," + str(self.other) + ")"
-    def and_(self, arg):
-        return P("and", self, arg)
-    def or_(self, arg):
-        return P("or", self, arg)
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.operator == other.operator and self.value == other.value and self.other == other.other
+
     def __repr__(self):
         return self.operator + "(" + str(self.value) + ")" if self.other is None else self.operator + "(" + str(self.value) + "," + str(self.other) + ")"
 <% pmethods.findAll{!it.equals("clone")}.each { method -> %>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c06e8a26/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/gremlin_python/process/traversal.py b/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
index 69275fb..747ed81 100644
--- a/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
+++ b/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
@@ -186,7 +186,6 @@ class P(object):
         self.value = value
         self.other = other
 
-
     @staticmethod
     def between(*args):
         return P("between", *args)
@@ -221,7 +220,7 @@ class P(object):
 
     @staticmethod
     def not_(*args):
-        return P("not_", *args)
+        return P("not", *args)
 
     @staticmethod
     def outside(*args):
@@ -241,18 +240,13 @@ class P(object):
 
     def and_(self, arg):
         return P("and", self, arg)
+
     def or_(self, arg):
         return P("or", self, arg)
+
     def __eq__(self, other):
         return isinstance(other, self.__class__) and self.operator == other.operator and self.value == other.value and self.other == other.other
-    def __repr__(self):
-        return self.operator + "(" + str(self.value) + ")" if self.other is None else self.operator + "(" + str(self.value) + "," + str(self.other) + ")"
-    def and_(self, arg):
-        return P("and", self, arg)
-    def or_(self, arg):
-        return P("or", self, arg)
-    def __eq__(self, other):
-        return isinstance(other, self.__class__) and self.operator == other.operator and self.value == other.value and self.other == other.other
+
     def __repr__(self):
         return self.operator + "(" + str(self.value) + ")" if self.other is None else self.operator + "(" + str(self.value) + "," + str(self.other) + ")"
 


[19/27] tinkerpop git commit: JavaScript GLV: include Barrier and Pop in test traversal context

Posted by sp...@apache.org.
JavaScript GLV: include Barrier and Pop in test traversal context


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

Branch: refs/heads/master
Commit: 2af60402d49957c3bd28e515afb981b68c4baafa
Parents: 1e38023
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Wed Feb 14 16:18:24 2018 +0100
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../javascript/gremlin-javascript/test/cucumber/feature-steps.js   | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2af60402/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 12bc835..9e12818 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -173,6 +173,7 @@ function getSandbox(g, parameters) {
   const sandbox = {
     g: g,
     __: __,
+    Barrier: traversalModule.barrier,
     Cardinality: traversalModule.cardinality,
     Column: traversalModule.column,
     Direction: {
@@ -183,6 +184,7 @@ function getSandbox(g, parameters) {
     Order: traversalModule.order,
     P: traversalModule.P,
     Pick: traversalModule.pick,
+    Pop: traversalModule.pop,
     Scope: traversalModule.scope,
     Operator: traversalModule.operator,
     T: traversalModule.t,


[15/27] tinkerpop git commit: TINKERPOP-1857 Fixed up union() and range() tests that were failing

Posted by sp...@apache.org.
TINKERPOP-1857 Fixed up union() and range() tests that were failing


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

Branch: refs/heads/master
Commit: d556f77994712c3fb91ab09e08720ced273b4474
Parents: 68669ea
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jan 24 10:27:13 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/branch/Union.feature |  2 +-
 gremlin-test/features/filter/Range.feature | 26 +------------------------
 gremlin-test/features/filter/Where.feature | 26 +++++++++++++++++++++++++
 3 files changed, 28 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d556f779/gremlin-test/features/branch/Union.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Union.feature b/gremlin-test/features/branch/Union.feature
index 2380246..83318f6 100644
--- a/gremlin-test/features/branch/Union.feature
+++ b/gremlin-test/features/branch/Union.feature
@@ -145,7 +145,7 @@ Feature: Step - union()
     And using the parameter v2Id defined as "v[vadas].id"
     And the traversal of
       """
-      g.V(v1Id, v2Id).local(union(count()))
+      g.V(v1Id, v2Id).local(__.union(__.count()))
       """
     When iterated to list
     Then the result should be unordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d556f779/gremlin-test/features/filter/Range.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Range.feature b/gremlin-test/features/filter/Range.feature
index 066960a..18aae9f 100644
--- a/gremlin-test/features/filter/Range.feature
+++ b/gremlin-test/features/filter/Range.feature
@@ -225,28 +225,4 @@ Feature: Step - range()
     Then the result should be unordered
       | result |
       | m[{"b":"josh"}] |
-      | m[{"b":"josh"}] |
-
-  Scenario: g_V_repeatXbothX_timesX3X_rangeX5_11X
-    Given the modern graph
-    And the traversal of
-      """
-      g.V().repeat(both()).times(3).range(5, 11)
-      """
-    When iterated to list
-    Then the result should be ordered
-      | result |
-      | d[6].l |
-
-  Scenario: g_V_repeatXbothX_timesX3X_rangeX5_11X
-    Given the modern graph
-    And using the parameter v1Id defined as "v[marko].id"
-    And the traversal of
-      """
-      g.V(v1Id).out("created").inE("created").range(1, 3).outV()
-      """
-    When iterated to list
-    Then the result should be unordered
-      | result |
-      | v[marko] |
-      | v[ripple] |
\ No newline at end of file
+      | m[{"b":"josh"}] |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d556f779/gremlin-test/features/filter/Where.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Where.feature b/gremlin-test/features/filter/Where.feature
index 5c520da..c13703c 100644
--- a/gremlin-test/features/filter/Where.feature
+++ b/gremlin-test/features/filter/Where.feature
@@ -103,3 +103,29 @@ Feature: Step - where()
       | josh |
       | peter |
 
+  Scenario: g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_neqXbXX_name
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("created").in("created").as("b").where("a", P.neq("b")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | josh |
+      | peter |
+
+  Scenario: g_VX1X_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXasXbX_outXcreatedX_hasXname_rippleXX_valuesXage_nameX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("created").in("created").as("b").where(__.as("b").out("created").has("name", "ripple")).values("age", "name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | josh |
+      | d[32].i |
+


[11/27] tinkerpop git commit: TINKERPOP-1857 Full has() test suite for GLVs

Posted by sp...@apache.org.
TINKERPOP-1857 Full has() test suite for GLVs

FeatureCoverageTest now passes for it. Added more consistency to the java test.


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

Branch: refs/heads/master
Commit: b2c79d61c019223a94ac890980955c3b819c4bc1
Parents: 20b10c4
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 28 18:38:24 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/filter/Has.feature        | 160 +++++++++++++++++++
 .../process/traversal/step/filter/HasTest.java  |   2 +-
 2 files changed, 161 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b2c79d61/gremlin-test/features/filter/Has.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Has.feature b/gremlin-test/features/filter/Has.feature
index f3ef5a0..17f2716 100644
--- a/gremlin-test/features/filter/Has.feature
+++ b/gremlin-test/features/filter/Has.feature
@@ -151,6 +151,45 @@ Feature: Step - has()
 
   Scenario: g_VXv2X_hasXage_gt_30X
     Given the modern graph
+    And using the parameter v4Id defined as "v[josh].id"
+    And using the parameter d30 defined as "d[30].i"
+    And the traversal of
+      """
+      g.V(g.V(v4Id).next()).has("age", P.gt(d30))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[josh] |
+
+  Scenario: g_VX1X_out_hasXid_lt_3X
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter v3Id defined as "v[lop].id"
+    And the traversal of
+      """
+      g.V(v1Id).out().has(T.id, P.lt(v3Id))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[vadas] |
+
+  Scenario: g_VX1AsStringX_out_hasXid_2AsStringX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].sid"
+    And using the parameter v2Id defined as "v[vadas].sid"
+    And the traversal of
+      """
+      g.V(v1Id).out().hasId(v2Id)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[vadas] |
+
+  Scenario: g_VX1X_out_hasXid_2X
+    Given the modern graph
     And using the parameter v2 defined as "v[josh]"
     And the traversal of
       """
@@ -174,6 +213,21 @@ Feature: Step - has()
       | result |
       | v[vadas] |
 
+  Scenario: g_VX1X_out_hasXid_2_3X
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter v2Id defined as "v[vadas].id"
+    And using the parameter v3Id defined as "v[lop].id"
+    And the traversal of
+      """
+      g.V(v1Id).out().hasId(v2Id, v3Id)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[vadas] |
+      | v[lop] |
+
   Scenario: g_VX1X_out_hasXid_2AsString_3AsStringX
     Given the modern graph
     And using the parameter v1Id defined as "v[marko].sid"
@@ -354,6 +408,19 @@ Feature: Step - has()
       | v[josh] |
       | v[peter] |
 
+  Scenario: g_V_both_dedup_properties_hasKeyXageX_value
+    Given the modern graph
+    And the traversal of
+    """
+    g.V().both().properties().dedup().hasKey("age").value()
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[29].i |
+      | d[27].i |
+      | d[32].i |
+      | d[35].i |
   Scenario: g_V_hasXage_withinX27X_count
     Given the modern graph
     And the traversal of
@@ -398,3 +465,96 @@ Feature: Step - has()
       | result |
       | d[2].l |
 
+
+  Scenario: g_V_both_dedup_properties_hasKeyXageX_hasValueXgtX30XX_value
+    Given the modern graph
+    And using the parameter d30 defined as "d[30].i"
+    And the traversal of
+    """
+    g.V().both().properties().dedup().hasKey("age").hasValue(P.gt(d30)).value()
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[32].i |
+      | d[35].i |
+
+  Scenario: g_V_hasNotXageX_name
+    Given the modern graph
+    And the traversal of
+    """
+    g.V().hasNot("age").values("name")
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | lop |
+      | ripple |
+
+  Scenario: g_V_hasIdX1X_hasIdX2X
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter v2Id defined as "v[vadas].id"
+    And the traversal of
+    """
+    g.V().hasId(v1Id).hasId(v2Id)
+    """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_hasLabelXpersonX_hasLabelXsoftwareX
+    Given the modern graph
+    And the traversal of
+    """
+    g.V().hasLabel("person").hasLabel("software")
+    """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_V_hasIdXemptyX_count
+    Given the modern graph
+    And using the parameter l defined as "l[]"
+    And the traversal of
+    """
+    g.V().hasId(l).count()
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[0].l |
+
+  Scenario: g_V_hasIdXwithinXemptyXX_count
+    Given the modern graph
+    And using the parameter l defined as "l[]"
+    And the traversal of
+    """
+    g.V().hasId(P.within(l)).count()
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[0].l |
+
+  Scenario: g_V_hasIdXwithoutXemptyXX_count
+    Given the modern graph
+    And using the parameter l defined as "l[]"
+    And the traversal of
+    """
+    g.V().hasId(P.without(l)).count()
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[6].l |
+
+  Scenario: g_V_notXhasIdXwithinXemptyXXX_count
+    Given the modern graph
+    And using the parameter l defined as "l[]"
+    And the traversal of
+    """
+    g.V().not(__.hasId(P.within(l))).count()
+    """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[6].l |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/b2c79d61/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
index 9071d7e..deff30b 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
@@ -590,7 +590,7 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
         @Override
         public Traversal<Vertex, Vertex> get_g_VXv1X_hasXage_gt_30X(final Object v1Id) {
-            return g.V(g.V(v1Id).next()).has("age", P.gt(30));
+            return g.V(v1Id).has("age", P.gt(30));
         }
 
         @Override


[16/27] tinkerpop git commit: TINKERPOP-1857 Rebased and added new union() test

Posted by sp...@apache.org.
TINKERPOP-1857 Rebased and added new union() test


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

Branch: refs/heads/master
Commit: 68669ea63f17fe517cfe5c3a049034e2de8062bb
Parents: c4fd3e1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jan 24 09:53:27 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/branch/Union.feature | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/68669ea6/gremlin-test/features/branch/Union.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Union.feature b/gremlin-test/features/branch/Union.feature
index 564e6b5..2380246 100644
--- a/gremlin-test/features/branch/Union.feature
+++ b/gremlin-test/features/branch/Union.feature
@@ -137,4 +137,18 @@ Feature: Step - union()
       | d[1.9].d |
       | d[0].i   |
       | d[0].l   |
+      | d[1].l   |
+
+  Scenario: g_VX1_2X_localXunionXcountXX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter v2Id defined as "v[vadas].id"
+    And the traversal of
+      """
+      g.V(v1Id, v2Id).local(union(count()))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1].l   |
       | d[1].l   |
\ No newline at end of file


[22/27] tinkerpop git commit: TINKERPOP-1857 Ignored a few failing tests for purpose of this issue

Posted by sp...@apache.org.
TINKERPOP-1857 Ignored a few failing tests for purpose of this issue

Will create a new issue specific to the JS GLV to resolve these ignored tests.


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

Branch: refs/heads/master
Commit: 58d93820e654a2c81c85c13ea9134b7ea0d459f2
Parents: 2af6040
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 14 10:46:58 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../gremlin-javascript/test/cucumber/feature-steps.js           | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/58d93820/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
index 9e12818..2bb6ef0 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
@@ -55,11 +55,16 @@ const parsers = [
 
 const ignoreReason = {
   lambdaNotSupported: 'Lambdas are not supported on gremlin-javascript',
+  needsFurtherInvestigation: '',
 };
 
 const ignoredScenarios = {
   // An associative array containing the scenario name as key, for example:
   // 'g_V_branchXlabel_eq_person': new IgnoreError(ignoreReason.lambdaNotSupported),
+  'g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name': new IgnoreError(ignoreReason.needsFurtherInvestigation),
+  'g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX': new IgnoreError(ignoreReason.needsFurtherInvestigation),
+  'g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX': new IgnoreError(ignoreReason.needsFurtherInvestigation),
+  'g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX': new IgnoreError(ignoreReason.needsFurtherInvestigation),
 };
 
 defineSupportCode(function(methods) {


[07/27] tinkerpop git commit: TINKERPOP-1857 Improved handling of empty graph in python glv tests

Posted by sp...@apache.org.
TINKERPOP-1857 Improved handling of empty graph in python glv tests

Caches were hardcoded to the modern graph. For empty graph this caused hassles because the cache couldn't be initialized until after the graph initializer step was executed. Still a bit messy due to cut/paste issues. Need to clean that up at a later point.


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

Branch: refs/heads/master
Commit: a1d040329e1da734f1af46513e36fd941f3e15b0
Parents: 1425f29
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 28 11:18:38 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 .../src/main/jython/radish/feature_steps.py     | 78 +++++++++++++++-----
 .../src/main/jython/radish/terrain.py           |  7 +-
 2 files changed, 63 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1d04032/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index 3de641e..e247b25 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -36,6 +36,11 @@ regex_or = re.compile(r"([(.,\s])or\(")
 regex_true = re.compile(r"(true)")
 regex_false = re.compile(r"(false)")
 
+outV = __.outV
+label = __.label
+inV = __.inV
+project = __.project
+tail = __.tail
 
 ignores = [
     "g.V(v1Id).out().inject(v2).values(\"name\")"  # bug in attachment won't connect v2
@@ -44,6 +49,7 @@ ignores = [
 
 @given("the {graph_name:w} graph")
 def choose_graph(step, graph_name):
+    step.context.graph_name = graph_name
     step.context.g = Graph().traversal().withRemote(step.context.remote_conn[graph_name])
 
 
@@ -54,7 +60,12 @@ def initialize_graph(step):
     # just be sure that the traversal returns something to prove that it worked to some degree. probably
     # is overkill to try to assert the complete success of this init operation. presumably the test
     # suite would fail elsewhere if this didn't work which would help identify a problem.
-    assert len(traversal.toList()) > 0
+    result = traversal.toList()
+    assert len(result) > 0
+
+    # add the first result - if a map - to the bindings. this is useful for cases when parameters for
+    # the test traversal need to come from the original graph initializer (i.e. a new graph is created
+    # and you need the id of a vertex from that graph)
 
 
 @given("an unsupported test")
@@ -127,37 +138,38 @@ def nothing_happening(step):
 
 
 def _convert(val, ctx):
-    if isinstance(val, dict):                                         # convert dictionary keys/values
+    graph_name = ctx.graph_name
+    if isinstance(val, dict):                                           # convert dictionary keys/values
         n = {}
         for key, value in val.items():
             n[_convert(key, ctx)] = _convert(value, ctx)
         return n
-    elif isinstance(val, unicode):                                    # convert annoying python 2.x unicode nonsense
+    elif isinstance(val, unicode):                                      # convert annoying python 2.x unicode nonsense
         return _convert(val.encode('utf-8'), ctx)
-    elif isinstance(val, str) and re.match("^l\[.*\]$", val):         # parse list
+    elif isinstance(val, str) and re.match("^l\[.*\]$", val):           # parse list
         return list(map((lambda x: _convert(x, ctx)), val[2:-1].split(",")))
-    elif isinstance(val, str) and re.match("^s\[.*\]$", val):         # parse set
+    elif isinstance(val, str) and re.match("^s\[.*\]$", val):           # parse set
         return set(map((lambda x: _convert(x, ctx)), val[2:-1].split(",")))
     elif isinstance(val, str) and re.match("^d\[.*\]\.[ilfdm]$", val):  # parse numeric
         return float(val[2:-3]) if val[2:-3].__contains__(".") else long(val[2:-3])
-    elif isinstance(val, str) and re.match("^v\[.*\]\.id$", val):     # parse vertex id
-        return ctx.lookup_v["modern"][val[2:-4]].id
-    elif isinstance(val, str) and re.match("^v\[.*\]\.sid$", val):    # parse vertex id as string
-        return ctx.lookup_v["modern"][val[2:-5]].id
-    elif isinstance(val, str) and re.match("^v\[.*\]$", val):         # parse vertex
-        return ctx.lookup_v["modern"][val[2:-1]]
-    elif isinstance(val, str) and re.match("^e\[.*\]\.id$", val):     # parse edge id
-        return ctx.lookup_e["modern"][val[2:-4]].id
-    elif isinstance(val, str) and re.match("^e\[.*\]\.sid$", val):    # parse edge id as string
-        return ctx.lookup_e["modern"][val[2:-5]].id
-    elif isinstance(val, str) and re.match("^e\[.*\]$", val):         # parse edge
-        return ctx.lookup_e["modern"][val[2:-1]]
-    elif isinstance(val, str) and re.match("^m\[.*\]$", val):         # parse json as a map
+    elif isinstance(val, str) and re.match("^v\[.*\]\.id$", val):       # parse vertex id
+        return __find_cached_element(ctx, graph_name, val[2:-4], "v").id
+    elif isinstance(val, str) and re.match("^v\[.*\]\.sid$", val):      # parse vertex id as string
+        return __find_cached_element(ctx, graph_name, val[2:-5], "v").id
+    elif isinstance(val, str) and re.match("^v\[.*\]$", val):           # parse vertex
+        return __find_cached_element(ctx, graph_name, val[2:-1], "v")
+    elif isinstance(val, str) and re.match("^e\[.*\]\.id$", val):       # parse edge id
+        return __find_cached_element(ctx, graph_name, val[2:-4], "e").id
+    elif isinstance(val, str) and re.match("^e\[.*\]\.sid$", val):      # parse edge id as string
+        return __find_cached_element(ctx, graph_name, val[2:-5], "e").id
+    elif isinstance(val, str) and re.match("^e\[.*\]$", val):           # parse edge
+        return __find_cached_element(ctx, graph_name, val[2:-1], "e")
+    elif isinstance(val, str) and re.match("^m\[.*\]$", val):           # parse json as a map
         return _convert(json.loads(val[2:-1].replace('\\"', '"')), ctx)
-    elif isinstance(val, str) and re.match("^p\[.*\]$", val):         # parse path
+    elif isinstance(val, str) and re.match("^p\[.*\]$", val):           # parse path
         path_objects = list(map((lambda x: _convert(x, ctx)), val[2:-1].split(",")))
         return Path([set([])], path_objects)
-    elif isinstance(val, str) and re.match("^c\[.*\]$", val):         # parse lambda/closure
+    elif isinstance(val, str) and re.match("^c\[.*\]$", val):           # parse lambda/closure
         return lambda: (val[2:-1], "gremlin-groovy")
     elif isinstance(val, str) and re.match("^t\[.*\]$", val):         # parse instance of T enum
         return T[val[2:-1]]
@@ -165,6 +177,15 @@ def _convert(val, ctx):
         return val
 
 
+def __find_cached_element(ctx, graph_name, identifier, element_type):
+    if graph_name == "empty":
+        cache = __create_lookup_v(ctx.remote_conn["empty"]) if element_type == "v" else __create_lookup_e(ctx.remote_conn["empty"])
+    else:
+        cache = ctx.lookup_v[graph_name] if element_type == "v" else ctx.lookup_e[graph_name]
+
+    return cache[identifier]
+
+
 def _convert_results(val):
     if isinstance(val, Path):
         # kill out labels as they aren't in the assertion logic
@@ -234,3 +255,20 @@ def _make_traversal(g, traversal_string, params):
     b.update(params)
 
     return eval(_translate(traversal_string), b)
+
+
+def __create_lookup_v(remote):
+    g = Graph().traversal().withRemote(remote)
+
+    # hold a map of name/vertex for use in asserting results
+    return g.V().group().by('name').by(tail()).next()
+
+
+def __create_lookup_e(remote):
+    g = Graph().traversal().withRemote(remote)
+
+    # hold a map of the "name"/edge for use in asserting results - "name" in this context is in the form of
+    # outgoingV-label->incomingV
+    return g.E().group(). \
+        by(lambda: ("it.outVertex().value('name') + '-' + it.label() + '->' + it.inVertex().value('name')", "gremlin-groovy")). \
+        by(tail()).next()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/a1d04032/gremlin-python/src/main/jython/radish/terrain.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/terrain.py b/gremlin-python/src/main/jython/radish/terrain.py
index 0c749eb..9aed647 100644
--- a/gremlin-python/src/main/jython/radish/terrain.py
+++ b/gremlin-python/src/main/jython/radish/terrain.py
@@ -17,7 +17,6 @@ specific language governing permissions and limitations
 under the License.
 '''
 
-import re
 from gremlin_python.structure.graph import Graph
 from gremlin_python.process.graph_traversal import __
 from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
@@ -58,6 +57,10 @@ def prepare_static_traversal_source(features, marker):
                 scenario.context.lookup_v[graph_name] = cache[graph_name]["lookup_v"]
                 scenario.context.lookup_e[graph_name] = cache[graph_name]["lookup_e"]
 
+            # setup the "empty" lookups as needed
+            scenario.context.lookup_v["empty"] = {}
+            scenario.context.lookup_e["empty"] = {}
+
 
 @before.each_scenario
 def prepare_traversal_source(scenario):
@@ -97,4 +100,4 @@ def __create_lookup_e(remote):
     # outgoingV-label->incomingV
     return g.E().group(). \
         by(lambda: ("it.outVertex().value('name') + '-' + it.label() + '->' + it.inVertex().value('name')", "gremlin-groovy")). \
-        by(tail()).next()
+        by(tail()).next()
\ No newline at end of file


[18/27] tinkerpop git commit: TINKERPOP-1857 Added the new "sink" test for GLVs

Posted by sp...@apache.org.
TINKERPOP-1857 Added the new "sink" test for GLVs

This involved adding "sink" infrastructure to the test server configuration and including it in the gherkin setups for each GLV


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

Branch: refs/heads/master
Commit: 7212253e6ff962232c906705c14fa95067fd11b9
Parents: 58d9382
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 14 11:17:15 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/ScenarioData.cs                         |  2 +-
 .../gremlin-javascript/test/cucumber/world.js       |  2 +-
 gremlin-python/src/main/jython/radish/terrain.py    |  4 ++--
 gremlin-server/src/test/scripts/generate-all.groovy |  4 +++-
 .../src/test/scripts/test-server-start.groovy       |  2 ++
 gremlin-test/features/branch/Repeat.feature         | 16 ++++++++++++++++
 6 files changed, 25 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
index ed767d5..77552f9 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/ScenarioData.cs
@@ -42,7 +42,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
         private static readonly Regex EdgeLRegex = new Regex("l=(.+?)[,}]", RegexOptions.Compiled);
         private static readonly Regex EdgeIRegex = new Regex("i=(.+?)[,}]", RegexOptions.Compiled);
         
-        private static readonly string[] GraphNames = {"modern", "classic", "crew", "grateful"};
+        private static readonly string[] GraphNames = {"modern", "classic", "crew", "grateful", "sink"};
 
         private static readonly IDictionary<string, Vertex> EmptyVertices =
             new ReadOnlyDictionary<string, Vertex>(new Dictionary<string, Vertex>());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
index ae3f9a6..f531720 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/world.js
@@ -68,7 +68,7 @@ defineSupportCode(function (methods) {
 
   methods.BeforeAll(function () {
     // load all traversals
-    const promises = ['modern', 'classic', 'crew', 'grateful', 'empty'].map(graphName => {
+    const promises = ['modern', 'classic', 'crew', 'grateful', 'sink', 'empty'].map(graphName => {
       let connection = null;
       if (graphName === 'empty') {
         connection = helper.getConnection('ggraph');

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-python/src/main/jython/radish/terrain.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/terrain.py b/gremlin-python/src/main/jython/radish/terrain.py
index 9aed647..4db443e 100644
--- a/gremlin-python/src/main/jython/radish/terrain.py
+++ b/gremlin-python/src/main/jython/radish/terrain.py
@@ -34,7 +34,7 @@ def prepare_static_traversal_source(features, marker):
     # as the various traversal sources for testing do not change their data, there is no need to re-create remotes
     # and client side lookup data over and over. it can be created once for all tests and be reused.
     cache = {}
-    for graph_name in (("modern", "gmodern"), ("classic", "gclassic"), ("crew", "gcrew"), ("grateful", "ggrateful")):
+    for graph_name in (("modern", "gmodern"), ("classic", "gclassic"), ("crew", "gcrew"), ("grateful", "ggrateful"), ("sink", "gsink")):
         cache[graph_name[0]] = {}
         remote = __create_remote(graph_name[1])
         cache[graph_name[0]]["remote_conn"] = __create_remote(graph_name[1])
@@ -52,7 +52,7 @@ def prepare_static_traversal_source(features, marker):
             scenario.context.lookup_v = {}
             scenario.context.lookup_e = {}
 
-            for graph_name in ("modern", "classic", "crew", "grateful"):
+            for graph_name in ("modern", "classic", "crew", "grateful", "sink"):
                 scenario.context.remote_conn[graph_name] = cache[graph_name]["remote_conn"]
                 scenario.context.lookup_v[graph_name] = cache[graph_name]["lookup_v"]
                 scenario.context.lookup_e[graph_name] = cache[graph_name]["lookup_e"]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-server/src/test/scripts/generate-all.groovy
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/scripts/generate-all.groovy b/gremlin-server/src/test/scripts/generate-all.groovy
index b6be405..108ca5d 100644
--- a/gremlin-server/src/test/scripts/generate-all.groovy
+++ b/gremlin-server/src/test/scripts/generate-all.groovy
@@ -27,6 +27,7 @@ globals << [hook : [
     TinkerFactory.generateClassic(classic)
     TinkerFactory.generateModern(modern)
     TinkerFactory.generateTheCrew(crew)
+    TinkerFactory.generateKitchenSink(sink)
     grateful.io(gryo()).readGraph('data/grateful-dead.kryo')
   }
 ] as LifeCycleHook]
@@ -37,4 +38,5 @@ globals << [gmodern : modern.traversal()]
 globals << [gcrew : crew.traversal()]
 globals << [ggraph : graph.traversal()]
 globals << [g : modern.traversal()]
-globals << [ggrateful : grateful.traversal()]
\ No newline at end of file
+globals << [ggrateful : grateful.traversal()]
+globals << [gsink : sink.traversal()]
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-server/src/test/scripts/test-server-start.groovy
----------------------------------------------------------------------
diff --git a/gremlin-server/src/test/scripts/test-server-start.groovy b/gremlin-server/src/test/scripts/test-server-start.groovy
index 157f01c..1cb2c53 100644
--- a/gremlin-server/src/test/scripts/test-server-start.groovy
+++ b/gremlin-server/src/test/scripts/test-server-start.groovy
@@ -30,6 +30,7 @@ settings.graphs.classic = gremlinServerDir + "/src/test/scripts/tinkergraph-empt
 settings.graphs.modern = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settings.graphs.crew = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settings.graphs.grateful = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
+settings.graphs.sink = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settings.scriptEngines["gremlin-groovy"].scripts = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
 if (Boolean.parseBoolean(python)) {
     settings.scriptEngines["gremlin-python"] = new Settings.ScriptEngineSettings()
@@ -49,6 +50,7 @@ settingsSecure.graphs.classic = gremlinServerDir + "/src/test/scripts/tinkergrap
 settingsSecure.graphs.modern = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settingsSecure.graphs.crew = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settingsSecure.graphs.grateful = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
+settingsSecure.graphs.sink = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 settingsSecure.scriptEngines["gremlin-groovy"].scripts = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
 if (Boolean.parseBoolean(python)) {
     settingsSecure.scriptEngines["gremlin-python"] = new Settings.ScriptEngineSettings()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7212253e/gremlin-test/features/branch/Repeat.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Repeat.feature b/gremlin-test/features/branch/Repeat.feature
index 009c380..6175519 100644
--- a/gremlin-test/features/branch/Repeat.feature
+++ b/gremlin-test/features/branch/Repeat.feature
@@ -228,3 +228,19 @@ Feature: Step - repeat()
       | josh  |
       | created |
       | ripple  |
+
+  Scenario: g_V_hasXloop_name_loopX_repeatXinX_timesX5X_path_by_name
+    Given the sink graph
+    And the traversal of
+      """
+      g.V().has("loops","name","loop").repeat(__.in()).times(5).path().by("name")
+      """
+    When iterated next
+    Then the result should be unordered
+      | result |
+      | loop |
+      | loop |
+      | loop  |
+      | loop |
+      | loop  |
+      | loop  |


[14/27] tinkerpop git commit: TINKERPOP-1857 Added support for empty lists and sets in python GLV test runner

Posted by sp...@apache.org.
TINKERPOP-1857 Added support for empty lists and sets in python GLV test runner


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

Branch: refs/heads/master
Commit: 20b10c445b84fc775487d8b288208a4b7b8df252
Parents: e74747d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 28 16:42:30 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-python/src/main/jython/radish/feature_steps.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/20b10c44/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index b61d5e0..c0574d0 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -154,9 +154,9 @@ def _convert(val, ctx):
     elif isinstance(val, unicode):                                      # convert annoying python 2.x unicode nonsense
         return _convert(val.encode('utf-8'), ctx)
     elif isinstance(val, str) and re.match("^l\[.*\]$", val):           # parse list
-        return list(map((lambda x: _convert(x, ctx)), val[2:-1].split(",")))
+        return [] if val == "l[]" else list(map((lambda x: _convert(x, ctx)), val[2:-1].split(",")))
     elif isinstance(val, str) and re.match("^s\[.*\]$", val):           # parse set
-        return set(map((lambda x: _convert(x, ctx)), val[2:-1].split(",")))
+        return set() if val == "s[]" else set(map((lambda x: _convert(x, ctx)), val[2:-1].split(",")))
     elif isinstance(val, str) and re.match("^d\[.*\]\.[ilfdm]$", val):  # parse numeric
         return float(val[2:-3]) if val[2:-3].__contains__(".") else long(val[2:-3])
     elif isinstance(val, str) and re.match("^v\[.*\]\.id$", val):       # parse vertex id


[23/27] tinkerpop git commit: TINKERPOP-1857 Fixed a bad has() GLV test

Posted by sp...@apache.org.
TINKERPOP-1857 Fixed a bad has() GLV test

Made test naming more consistent.


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

Branch: refs/heads/master
Commit: 97d4511c65ecb410b566a13b594aaa2786afe2ec
Parents: 5db5f21
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Feb 7 08:19:26 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/filter/Has.feature                | 12 ++++++------
 .../gremlin/process/traversal/step/filter/HasTest.java  |  8 ++++----
 2 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/97d4511c/gremlin-test/features/filter/Has.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Has.feature b/gremlin-test/features/filter/Has.feature
index 17f2716..ddf9984 100644
--- a/gremlin-test/features/filter/Has.feature
+++ b/gremlin-test/features/filter/Has.feature
@@ -127,12 +127,12 @@ Feature: Step - has()
     When iterated to list
     Then the result should be empty
 
-  Scenario: g_VX2X_hasXage_gt_30X
+  Scenario: g_VX4X_hasXage_gt_30X
     Given the modern graph
-    And using the parameter v2Id defined as "v[josh].id"
+    And using the parameter v4Id defined as "v[josh].id"
     And the traversal of
       """
-      g.V(v2Id).has("age", P.gt(30))
+      g.V(v4Id).has("age", P.gt(30))
       """
     When iterated to list
     Then the result should be unordered
@@ -149,13 +149,13 @@ Feature: Step - has()
     When iterated to list
     Then the result should be empty
 
-  Scenario: g_VXv2X_hasXage_gt_30X
+  Scenario: g_VXv4X_hasXage_gt_30X
     Given the modern graph
-    And using the parameter v4Id defined as "v[josh].id"
+    And using the parameter v4 defined as "v[josh]"
     And using the parameter d30 defined as "d[30].i"
     And the traversal of
       """
-      g.V(g.V(v4Id).next()).has("age", P.gt(d30))
+      g.V(v4).has("age", P.gt(d30))
       """
     When iterated to list
     Then the result should be unordered

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/97d4511c/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
index deff30b..3bdb24a 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/HasTest.java
@@ -218,7 +218,7 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_VX2X_hasXage_gt_30X() {
+    public void g_VX4X_hasXage_gt_30X() {
         final Traversal<Vertex, Vertex> traversalJosh = get_g_VX1X_hasXage_gt_30X(convertToVertexId("josh"));
         printTraversalForm(traversalJosh);
         assertTrue(traversalJosh.hasNext());
@@ -227,15 +227,15 @@ public abstract class HasTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_VXv1X_hasXage_gt_30X() {
-        final Traversal<Vertex, Vertex> traversalMarko = get_g_VXv1X_hasXage_gt_30X(convertToVertexId("marko"));
+        final Traversal<Vertex, Vertex> traversalMarko = get_g_VXv1X_hasXage_gt_30X(convertToVertex(graph,"marko"));
         printTraversalForm(traversalMarko);
         assertFalse(traversalMarko.hasNext());
     }
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_VXv2X_hasXage_gt_30X() {
-        final Traversal<Vertex, Vertex> traversalJosh = get_g_VXv1X_hasXage_gt_30X(convertToVertexId("josh"));
+    public void g_VXv4X_hasXage_gt_30X() {
+        final Traversal<Vertex, Vertex> traversalJosh = get_g_VXv1X_hasXage_gt_30X(convertToVertex(graph,"josh"));
         printTraversalForm(traversalJosh);
         assertTrue(traversalJosh.hasNext());
     }


[21/27] tinkerpop git commit: TINKERPOP-1857 Temporarily ignore test failures with .net GLV tests

Posted by sp...@apache.org.
TINKERPOP-1857 Temporarily ignore test failures with .net GLV tests


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

Branch: refs/heads/master
Commit: 10f29cbe94424a03f1710695fcd396cbc0ae95ff
Parents: bdd5e4c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 9 09:52:37 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                | 24 ++++++++++++++++++--
 .../Gherkin/IgnoreException.cs                  |  6 ++++-
 2 files changed, 27 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10f29cbe/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index 9cb3cf0..69af86f 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@ -37,8 +37,28 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
 {
     public class GherkinTestRunner
     {
-        private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios =
-            new Dictionary<string, IgnoreReason>();
+        private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = new Dictionary<string, IgnoreReason> {
+            { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasIdXwithinXemptyXX_count", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },
+            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
+        };
         
         private static class Keywords
         {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/10f29cbe/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index ae236c7..0179994 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@ -43,6 +43,9 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
                 case IgnoreReason.LambdaNotSupported:
                     reasonSuffix = " because lambdas are not supported in Gremlin.NET";
                     break;
+                case IgnoreReason.NeedsFurtherInvestigation:
+                    reasonSuffix = " as further investigation is required";
+                    break;
             }
             return $"Scenario ignored" + reasonSuffix;
         }
@@ -50,6 +53,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
     
     public enum IgnoreReason
     {
-        LambdaNotSupported
+        LambdaNotSupported,
+        NeedsFurtherInvestigation
     }
 }
\ No newline at end of file


[13/27] tinkerpop git commit: TINKERPOP-1857 Got range() GLV tests all in place

Posted by sp...@apache.org.
TINKERPOP-1857 Got range() GLV tests all in place


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

Branch: refs/heads/master
Commit: c4fd3e13f48c5c0dec5d0827fea8f4af61b44a31
Parents: b2c79d6
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jan 24 08:08:10 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/filter/Range.feature | 30 ++++++++++++++++++++++---
 1 file changed, 27 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c4fd3e13/gremlin-test/features/filter/Range.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Range.feature b/gremlin-test/features/filter/Range.feature
index 42e2f9a..066960a 100644
--- a/gremlin-test/features/filter/Range.feature
+++ b/gremlin-test/features/filter/Range.feature
@@ -90,7 +90,7 @@ Feature: Step - range()
       | v[peter] |
     And the result should have a count of 2
 
-  Scenario: get_g_VX1X_outXcreatedX_inEXcreatedX_rangeX1_3X_outV
+  Scenario: g_VX1X_outXcreatedX_inEXcreatedX_rangeX1_3X_outV
     Given the modern graph
     And using the parameter v1Id defined as "v[marko].id"
     And the traversal of
@@ -105,7 +105,7 @@ Feature: Step - range()
       | v[peter] |
     And the result should have a count of 2
 
-  Scenario: get_g_V_repeatXbothX_timesX3X_rangeX5_11X
+  Scenario: g_V_repeatXbothX_timesX3X_rangeX5_11X
     Given the modern graph
     And the traversal of
       """
@@ -225,4 +225,28 @@ Feature: Step - range()
     Then the result should be unordered
       | result |
       | m[{"b":"josh"}] |
-      | m[{"b":"josh"}] |
\ No newline at end of file
+      | m[{"b":"josh"}] |
+
+  Scenario: g_V_repeatXbothX_timesX3X_rangeX5_11X
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().repeat(both()).times(3).range(5, 11)
+      """
+    When iterated to list
+    Then the result should be ordered
+      | result |
+      | d[6].l |
+
+  Scenario: g_V_repeatXbothX_timesX3X_rangeX5_11X
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).out("created").inE("created").range(1, 3).outV()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+      | v[ripple] |
\ No newline at end of file


[03/27] tinkerpop git commit: TINKERPOP-1857 Added GLV match() tests

Posted by sp...@apache.org.
TINKERPOP-1857 Added GLV match() tests


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

Branch: refs/heads/master
Commit: ade1daf8670de64c3f57d9c7f13c2645e58754ac
Parents: 7a44584
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 1 13:06:44 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/map/Match.feature         | 315 +++++++++++++++++++
 .../process/traversal/step/map/MatchTest.java   |   4 +-
 .../gremlin/process/FeatureCoverageTest.java    |  17 +-
 3 files changed, 330 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ade1daf8/gremlin-test/features/map/Match.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Match.feature b/gremlin-test/features/map/Match.feature
index e3f04d5..006692a 100644
--- a/gremlin-test/features/map/Match.feature
+++ b/gremlin-test/features/map/Match.feature
@@ -78,3 +78,318 @@ Feature: Step - match()
       | m[{"a":"v[marko]","b":"v[josh]", "c":"v[ripple]"}] |
       | m[{"a":"v[marko]","b":"v[josh]", "c":"v[lop]"}] |
 
+  Scenario: g_V_matchXa_created_b__b_0created_cX_whereXa_neq_cX_selectXa_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("created").as("b"),
+                  __.as("b").in("created").as("c")).where("a", P.neq("c")).select("a", "c")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","c":"v[josh]"}] |
+      | m[{"a":"v[marko]","c":"v[peter]"}] |
+      | m[{"a":"v[josh]","c":"v[marko]"}] |
+      | m[{"a":"v[josh]","c":"v[peter]"}] |
+      | m[{"a":"v[peter]","c":"v[marko]"}] |
+      | m[{"a":"v[peter]","c":"v[josh]"}] |
+
+  Scenario: g_V_matchXd_0knows_a__d_hasXname_vadasX__a_knows_b__b_created_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("d").in("knows").as("a"),
+                  __.as("d").has("name", "vadas"),
+                  __.as("a").out("knows").as("b"),
+                  __.as("b").out("created").as("c"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[ripple]","d":"v[vadas]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]","d":"v[vadas]"}] |
+
+  Scenario: g_V_matchXa_created_lop_b__b_0created_29_c__c_whereXrepeatXoutX_timesX2XXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("created").has("name", "lop").as("b"),
+                  __.as("b").in("created").has("age", 29).as("c"),
+                  __.as("c").where(__.repeat(__.out()).times(2)))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[josh]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[peter]","b":"v[lop]","c":"v[marko]"}] |
+
+  Scenario: g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("b").match(__.as("a").out().count().as("c"), __.as("b").in().count().as("c"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":3}] |
+
+  Scenario: g_V_matchXa__a_out_b__notXa_created_bXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out().as("b"),__.not(__.as("a").out("created").as("b")))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[vadas]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]"}] |
+
+  Scenario: g_V_matchXa_created_lop_b__b_0created_29_cX_whereXc_repeatXoutX_timesX2XX_selectXa_b_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("created").has("name", "lop").as("b"),
+                  __.as("b").in("created").has("age", 29).as("c")).where(__.as("c").repeat(__.out()).times(2)).select("a", "b", "c")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[josh]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[peter]","b":"v[lop]","c":"v[marko]"}] |
+
+  Scenario: g_V_out_out_matchXa_0created_b__b_0knows_cX_selectXcX_outXcreatedX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().out().out().match(__.as("a").in("created").as("b"),
+                              __.as("b").in("knows").as("c")).
+                        select("c").out("created").values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | lop    |
+      | lop    |
+
+  Scenario: g_V_matchXa_knows_b__b_created_c__a_created_cX_dedupXa_b_cX_selectXaX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("knows").as("b"),
+                  __.as("b").out("created").as("c"),
+                  __.as("a").out("created").as("c")).dedup("a", "b", "c").select("a").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+
+  Scenario: g_V_matchXa_created_b__a_repeatXoutX_timesX2XX_selectXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("created").as("b"),
+                  __.as("a").repeat(__.out()).times(2).as("b")).select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]"}] |
+
+  Scenario: g_V_notXmatchXa_age_b__a_name_cX_whereXb_eqXcXX_selectXaXX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().not(__.match(__.as("a").values("age").as("b"), __.as("a").values("name").as("c")).where("b", P.eq("c")).select("a")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+      | vadas |
+      | lop   |
+      | josh  |
+      | ripple |
+      | peter  |
+
+  Scenario: g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("knows").as("b"),
+                  __.and(__.as("a").out("created").as("c"),
+                         __.as("b").out("created").as("c"),
+                         __.and(__.as("b").out("created").count().as("d"),
+                                __.as("a").out("knows").count().as("d"))))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]","d":2}] |
+
+  Scenario: g_V_matchXa_whereXa_neqXcXX__a_created_b__orXa_knows_vadas__a_0knows_and_a_hasXlabel_personXX__b_0created_c__b_0created_count_isXgtX1XXX_selectXa_b_cX_byXidX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.where("a", P.neq("c")),
+                  __.as("a").out("created").as("b"),
+                  __.or(__.as("a").out("knows").has("name", "vadas"),
+                        __.as("a").in("knows").and().as("a").has(T.label, "person")),
+                  __.as("b").in("created").as("c"),
+                  __.as("b").in("created").count().is(P.gt(1))).select("a", "b", "c").by(T.id)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":1,"b":3,"c":4}] |
+      | m[{"a":1,"b":3,"c":6}] |
+      | m[{"a":4,"b":3,"c":1}] |
+      | m[{"a":4,"b":3,"c":6}] |
+
+  Scenario: g_V_matchXa__a_both_b__b_both_cX_dedupXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").both().as("b"),
+                  __.as("b").both().as("c")).dedup("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[marko]","b":"v[vadas]","c":"v[marko]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[ripple]"}] |
+      | m[{"a":"v[vadas]","b":"v[marko]","c":"v[lop]"}] |
+      | m[{"a":"v[lop]","b":"v[marko]","c":"v[lop]"}] |
+      | m[{"a":"v[lop]","b":"v[josh]","c":"v[ripple]"}] |
+      | m[{"a":"v[lop]","b":"v[peter]","c":"v[lop]"}] |
+      | m[{"a":"v[josh]","b":"v[ripple]","c":"v[josh]"}] |
+      | m[{"a":"v[josh]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[josh]","b":"v[marko]","c":"v[lop]"}] |
+      | m[{"a":"v[ripple]","b":"v[josh]","c":"v[ripple]"}] |
+      | m[{"a":"v[peter]","b":"v[lop]","c":"v[marko]"}] |
+
+  Scenario: g_V_matchXa_knows_b__b_created_lop__b_matchXb_created_d__d_0created_cX_selectXcX_cX_selectXa_b_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("knows").as("b"),
+                  __.as("b").out("created").has("name", "lop"),
+                  __.as("b").match(__.as("b").out("created").as("d"),
+                                   __.as("d").in("created").as("c")).select("c").as("c")).select("a", "b", "c")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[josh]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[marko]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[josh]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[peter]"}] |
+
+  Scenario: g_V_matchXa_knows_b__a_created_cX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("knows").as("b"),
+                  __.as("a").out("created").as("c"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[vadas]","c":"v[lop]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"v[lop]"}] |
+
+  Scenario: g_V_matchXwhereXandXa_created_b__b_0created_count_isXeqX3XXXX__a_both_b__whereXb_inXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.where(__.and(__.as("a").out("created").as("b"),
+                                  __.as("b").in("created").count().is(P.eq(3)))),
+                  __.as("a").both().as("b"),
+                  __.where(__.as("b").in()))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]"}] |
+      | m[{"a":"v[josh]","b":"v[lop]"}] |
+      | m[{"a":"v[peter]","b":"v[lop]"}] |
+
+  Scenario: g_V_matchXa_outEXcreatedX_order_byXweight_decrX_limitX1X_inV_b__b_hasXlang_javaXX_selectXa_bX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").outE("created").order().by("weight", Order.decr).limit(1).inV().as("b"),
+                  __.as("b").has("lang", "java")).select("a", "b").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"marko","b":"lop"}] |
+      | m[{"a":"josh","b":"ripple"}] |
+      | m[{"a":"peter","b":"lop"}] |
+
+  Scenario: g_V_matchXa_both_b__b_both_cX_dedupXa_bX_byXlabelX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").both().as("b"),
+                  __.as("b").both().as("c")).dedup("a", "b").by(T.label)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"v[marko]"}] |
+      | m[{"a":"v[marko]","b":"v[vadas]","c":"v[marko]"}] |
+      | m[{"a":"v[lop]","b":"v[marko]","c":"v[lop]"}] |
+
+  Scenario: g_V_matchXa_created_b__b_0created_aX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("created").as("b"),
+                  __.as("b").in("created").as("a"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]"}] |
+      | m[{"a":"v[josh]","b":"v[ripple]"}] |
+      | m[{"a":"v[josh]","b":"v[lop]"}] |
+      | m[{"a":"v[peter]","b":"v[lop]"}] |
+
+  Scenario: g_V_asXaX_out_asXbX_matchXa_out_count_c__orXa_knows_b__b_in_count_c__and__c_isXgtX2XXXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("b").match(__.as("a").out().count().as("c"),
+                                        __.or(__.as("a").out("knows").as("b"),__.as("b").in().count().as("c").and().as("c").is(P.gt(2))))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[lop]","c":"d[3].l"}] |
+      | m[{"a":"v[marko]","b":"v[vadas]","c":"d[3].l"}] |
+      | m[{"a":"v[marko]","b":"v[josh]","c":"d[3].l"}] |
+
+  Scenario: g_V_matchXa_knows_count_bX_selectXbX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().match(__.as("a").out("knows").count().as("b")).select("b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[2].l |
+      | d[0].l |
+      | d[0].l |
+      | d[0].l |
+      | d[0].l |
+      | d[0].l |
+

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ade1daf8/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
index cab3cbf..40ae6e9 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/MatchTest.java
@@ -255,7 +255,7 @@ public abstract class MatchTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_matchXa_created_b__a_repeatXoutX_timesX2XX_selectXab_nameX() throws Exception {
+    public void g_V_matchXa_created_b__a_repeatXoutX_timesX2XX_selectXa_bX() throws Exception {
         final Traversal<Vertex, Map<String, Vertex>> traversal = get_g_V_matchXa_created_b__a_repeatXoutX_timesX2XX_selectXa_bX();
         printTraversalForm(traversal);
         assertTrue(traversal.hasNext());
@@ -490,7 +490,7 @@ public abstract class MatchTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_matchXwhereXandXa_created_b__b_0created_count_isXeqX3XXXX__a_both_bX() {
+    public void g_V_matchXwhereXandXa_created_b__b_0created_count_isXeqX3XXXX__a_both_b__whereXb_inXX() {
         final Traversal<Vertex, Map<String, Object>> traversal = get_g_V_matchXwhereXandXa_created_b__b_0created_count_isXeqX3XXXX__a_both_b__whereXb_inXX();
         printTraversalForm(traversal);
         checkResults(makeMapList(2,

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ade1daf8/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index ff6156a..48c64b9 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -100,11 +100,20 @@ public class FeatureCoverageTest {
 
     private static Pattern scenarioName = Pattern.compile("^\\s*Scenario:\\s*(.*)$");
 
-    // g_V_addVXlabel_animal_age_0X - deprecated
-    // g_addVXlabel_person_name_stephenX - deprecated
     private static final List<String> testToIgnore = Arrays.asList(
+            // deprecated tests
             "g_V_addVXlabel_animal_age_0X",
-            "g_addVXlabel_person_name_stephenX");
+            "g_addVXlabel_person_name_stephenX",
+            // grateful dead graph not supported in GLV suite
+            "g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_d__c_sungBy_d__d_hasXname_GarciaXX",
+            "g_V_matchXa_hasXsong_name_sunshineX__a_mapX0followedBy_weight_meanX_b__a_0followedBy_c__c_filterXweight_whereXgteXbXXX_outV_dX_selectXdX_byXnameX",
+            "g_V_matchXa_0sungBy_b__a_0sungBy_c__b_writtenBy_d__c_writtenBy_e__d_hasXname_George_HarisonX__e_hasXname_Bob_MarleyXX",
+            "g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__a_0sungBy_bX",
+            "g_V_hasLabelXsongsX_matchXa_name_b__a_performances_cX_selectXb_cX_count",
+            "g_V_matchXa_hasXname_GarciaX__a_0writtenBy_b__b_followedBy_c__c_writtenBy_d__whereXd_neqXaXXX",
+            "g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_dX_whereXc_sungBy_dX_whereXd_hasXname_GarciaXX",
+            "get_g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
+            "g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count");
 
     @Test
     // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")
@@ -208,7 +217,7 @@ public class FeatureCoverageTest {
 
             testMethods.removeAll(testsInFeatureFile);
 
-            assertEquals("All test methods are not implemented in the " + featureFileName + ": " + testMethods, testMethods.size(), 0);
+            assertEquals("All test methods are not implemented in the " + featureFileName + ": " + testMethods, 0, testMethods.size());
         }
     }
 }


[08/27] tinkerpop git commit: TINKERPOP-1857 Python GLV tests were not string-ing IDs

Posted by sp...@apache.org.
TINKERPOP-1857 Python GLV tests were not string-ing IDs


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

Branch: refs/heads/master
Commit: e96a2a60e2038d2049215c33a83a8623a9e399c6
Parents: a1d0403
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 28 11:25:06 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-python/src/main/jython/radish/feature_steps.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/e96a2a60/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index e247b25..d5d3560 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -155,13 +155,13 @@ def _convert(val, ctx):
     elif isinstance(val, str) and re.match("^v\[.*\]\.id$", val):       # parse vertex id
         return __find_cached_element(ctx, graph_name, val[2:-4], "v").id
     elif isinstance(val, str) and re.match("^v\[.*\]\.sid$", val):      # parse vertex id as string
-        return __find_cached_element(ctx, graph_name, val[2:-5], "v").id
+        return str(__find_cached_element(ctx, graph_name, val[2:-5], "v").id)
     elif isinstance(val, str) and re.match("^v\[.*\]$", val):           # parse vertex
         return __find_cached_element(ctx, graph_name, val[2:-1], "v")
     elif isinstance(val, str) and re.match("^e\[.*\]\.id$", val):       # parse edge id
         return __find_cached_element(ctx, graph_name, val[2:-4], "e").id
     elif isinstance(val, str) and re.match("^e\[.*\]\.sid$", val):      # parse edge id as string
-        return __find_cached_element(ctx, graph_name, val[2:-5], "e").id
+        return str(__find_cached_element(ctx, graph_name, val[2:-5], "e").id)
     elif isinstance(val, str) and re.match("^e\[.*\]$", val):           # parse edge
         return __find_cached_element(ctx, graph_name, val[2:-1], "e")
     elif isinstance(val, str) and re.match("^m\[.*\]$", val):           # parse json as a map


[09/27] tinkerpop git commit: TINKERPOP-1857 Added ignore for a has() test in the python GLV tests

Posted by sp...@apache.org.
TINKERPOP-1857 Added ignore for a has() test in the python GLV tests

Created TINKERPOP-1859 regarding bad bytecode generation for complex P instances


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

Branch: refs/heads/master
Commit: 1f2530e84c1b75e9ab8df775835be9b4afc59a35
Parents: c06e8a2
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Dec 28 15:03:22 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-python/src/main/jython/radish/feature_steps.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1f2530e8/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index d5d3560..b61d5e0 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -43,7 +43,8 @@ project = __.project
 tail = __.tail
 
 ignores = [
-    "g.V(v1Id).out().inject(v2).values(\"name\")"  # bug in attachment won't connect v2
+    "g.V(v1Id).out().inject(v2).values(\"name\")",  # bug in attachment won't connect v2
+    "g.V().hasLabel(\"person\").has(\"age\", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values(\"name\")" # TINKERPOP-1859
            ]
 
 
@@ -92,11 +93,17 @@ def translate_traversal(step):
 
 @when("iterated to list")
 def iterate_the_traversal(step):
+    if step.context.ignore:
+        return
+    
     step.context.result = map(lambda x: _convert_results(x), step.context.traversal.toList())
 
 
 @when("iterated next")
 def next_the_traversal(step):
+    if step.context.ignore:
+        return
+
     step.context.result = map(lambda x: _convert_results(x), step.context.traversal.next())
 
 


[17/27] tinkerpop git commit: JavaScript GLV: handle responses without identifier and clear handler

Posted by sp...@apache.org.
JavaScript GLV: handle responses without identifier and clear handler


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

Branch: refs/heads/master
Commit: 1e38023c7ebfb3ae83578625d9d99f60798abdcc
Parents: 10f29cb
Author: Jorge Bay Gondra <jo...@gmail.com>
Authored: Wed Feb 14 16:11:13 2018 +0100
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../lib/driver/driver-remote-connection.js      | 35 ++++++++++++++++++++
 1 file changed, 35 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1e38023c/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
----------------------------------------------------------------------
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
index 5587fd6..d9e6000 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/lib/driver/driver-remote-connection.js
@@ -126,7 +126,31 @@ class DriverRemoteConnection extends RemoteConnection {
 
   _handleMessage(data) {
     const response = this._reader.read(JSON.parse(data.toString()));
+    if (response.requestId === null || response.requestId === undefined) {
+        // There was a serialization issue on the server that prevented the parsing of the request id
+        // We invoke any of the pending handlers with an error
+        Object.keys(this._responseHandlers).forEach(requestId => {
+          const handler = this._responseHandlers[requestId];
+          this._clearHandler(requestId);
+          if (response.status !== undefined && response.status.message) {
+            return handler.callback(
+              new Error(util.format(
+                'Server error (no request information): %s (%d)', response.status.message, response.status.code)));
+          } else {
+            return handler.callback(new Error(util.format('Server error (no request information): %j', response)));
+          }
+        });
+        return;
+    }
+
     const handler = this._responseHandlers[response.requestId];
+
+    if (!handler) {
+      // The handler for a given request id was not found
+      // It was probably invoked earlier due to a serialization issue.
+      return;
+    }
+
     if (response.status.code >= 400) {
       // callback in error
       return handler.callback(
@@ -134,6 +158,7 @@ class DriverRemoteConnection extends RemoteConnection {
     }
     switch (response.status.code) {
       case responseStatusCode.noContent:
+        this._clearHandler(response.requestId);
         return handler.callback(null, { traversers: []});
       case responseStatusCode.partialContent:
         handler.result = handler.result || [];
@@ -146,11 +171,21 @@ class DriverRemoteConnection extends RemoteConnection {
         else {
           handler.result = response.result.data;
         }
+        this._clearHandler(response.requestId);
         return handler.callback(null, { traversers: handler.result });
     }
   }
 
   /**
+   * Clears the internal state containing the callback and result buffer of a given request.
+   * @param requestId
+   * @private
+   */
+  _clearHandler(requestId) {
+    delete this._responseHandlers[requestId];
+  }
+
+  /**
    * Closes the Connection.
    * @return {Promise}
    */


[27/27] tinkerpop git commit: Merge branch 'tp32'

Posted by sp...@apache.org.
Merge branch 'tp32'

Conflicts:
	gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
	gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
	gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
	gremlin-server/src/test/scripts/test-server-start.groovy


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

Branch: refs/heads/master
Commit: 1c49c274fdb24acbfed3697e85dbf09509d3e57b
Parents: 9043744 d42d54d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 14:06:43 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 14:06:43 2018 -0500

----------------------------------------------------------------------
 .../Gherkin/GherkinTestRunner.cs                |  22 +-
 .../Gherkin/IgnoreException.cs                  |  12 +-
 .../Gherkin/ScenarioData.cs                     |   2 +-
 .../lib/driver/driver-remote-connection.js      |  35 ++
 .../test/cucumber/feature-steps.js              |   7 +
 .../gremlin-javascript/test/cucumber/world.js   |   2 +-
 gremlin-python/glv/TraversalSource.template     |  14 +-
 .../jython/gremlin_python/process/traversal.py  |  14 +-
 .../src/main/jython/radish/feature_steps.py     | 105 +++-
 .../src/main/jython/radish/terrain.py           |   9 +-
 .../src/test/scripts/generate-all.groovy        |   4 +-
 .../src/test/scripts/test-server-start.groovy   |   2 +
 gremlin-test/features/branch/Repeat.feature     |  16 +
 gremlin-test/features/branch/Union.feature      |  16 +-
 gremlin-test/features/filter/Filter.feature     |  24 +
 gremlin-test/features/filter/Has.feature        | 479 ++++++++++++++++++-
 gremlin-test/features/filter/Range.feature      |   4 +-
 gremlin-test/features/filter/Where.feature      | 221 +++++++++
 gremlin-test/features/map/AddVertex.feature     | 165 ++++++-
 gremlin-test/features/map/Match.feature         | 315 ++++++++++++
 gremlin-test/features/map/Min.feature           |  11 +
 gremlin-test/features/map/Order.feature         | 193 ++++++++
 gremlin-test/features/map/Properties.feature    |  16 +-
 gremlin-test/features/map/Select.feature        | 195 +++++++-
 gremlin-test/features/sideEffect/Inject.feature |  17 +
 gremlin-test/features/sideEffect/Sack.feature   |  42 +-
 .../features/sideEffect/SideEffectCap.feature   |   8 +-
 .../traversal/step/branch/LocalTest.java        |   2 +-
 .../traversal/step/branch/RepeatTest.java       |   2 +-
 .../traversal/step/branch/UnionTest.java        |   4 +-
 .../process/traversal/step/filter/AndTest.java  |   4 +-
 .../traversal/step/filter/FilterTest.java       |   9 +-
 .../process/traversal/step/filter/HasTest.java  |  43 +-
 .../traversal/step/filter/WhereTest.java        |  10 +-
 .../traversal/step/map/AddVertexTest.java       |  27 +-
 .../process/traversal/step/map/MatchTest.java   |   4 +-
 .../process/traversal/step/map/SelectTest.java  |   2 +-
 .../gremlin/process/FeatureCoverageTest.java    | 120 ++++-
 38 files changed, 2036 insertions(+), 141 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
index e3c92f3,69af86f..5f331cb
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/GherkinTestRunner.cs
@@@ -37,12 -37,28 +37,32 @@@ namespace Gremlin.Net.IntegrationTest.G
  {
      public class GherkinTestRunner
      {
 -        private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios = new Dictionary<string, IgnoreReason> {
 -            { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasIdXwithinXemptyXX_count", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },
 -            { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
 -        };
 +        private static readonly IDictionary<string, IgnoreReason> IgnoredScenarios =
 +            new Dictionary<string, IgnoreReason>
 +            {
 +                { "g_V_valueMapXtrueX", IgnoreReason.TraversalTDeserializationNotSupported },
-                 { "g_V_valueMapXtrue_name_ageX", IgnoreReason.TraversalTDeserializationNotSupported }
++                { "g_V_valueMapXtrue_name_ageX", IgnoreReason.TraversalTDeserializationNotSupported },
++                { "g_V_hasLabelXpersonX_hasXage_notXlteX10X_andXnotXbetweenX11_20XXXX_andXltX29X_orXeqX35XXXX_name", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasIdXwithinXemptyXX_count", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_outE_weight_groupCount_selectXkeysX_unfold", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_asXaX_out_asXbX_matchXa_out_count_c__b_in_count_cX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_matchXa_knows_b__andXa_created_c__b_created_c__andXb_created_count_d__a_knows_count_dXXX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_foo_injectX9999999999X_min", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_orderXlocalX_byXvaluesX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_localXbothE_weight_foldX_order_byXsumXlocalX_decrX", IgnoreReason.NeedsFurtherInvestigation },
++                { "g_V_hasLabelXpersonX_group_byXnameX_byXoutE_weight_sumX_unfold_order_byXvalues_decrX", IgnoreReason.NeedsFurtherInvestigation }
 +            };
          
          private static class Keywords
          {

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
----------------------------------------------------------------------
diff --cc gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
index 915a069,0179994..7733f34
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/IgnoreException.cs
@@@ -43,9 -43,9 +43,12 @@@ namespace Gremlin.Net.IntegrationTest.G
                  case IgnoreReason.LambdaNotSupported:
                      reasonSuffix = " because lambdas are not supported in Gremlin.NET";
                      break;
 +                case IgnoreReason.TraversalTDeserializationNotSupported:
 +                    reasonSuffix = " as deserialization of g:T on GraphSON3 is not supported";
 +                    break;
+                 case IgnoreReason.NeedsFurtherInvestigation:
+                     reasonSuffix = " as further investigation is required";
+                     break;
              }
              return $"Scenario ignored" + reasonSuffix;
          }
@@@ -53,14 -53,7 +56,19 @@@
      
      public enum IgnoreReason
      {
 +        /// <summary>
 +        /// Lambdas are not supported on Gremlin.NET yet.
 +        /// </summary>
          LambdaNotSupported,
-         
++
 +        /// <summary>
 +        /// Deserialization of g:T on GraphSON3 is not supported.
 +        /// </summary>
-         TraversalTDeserializationNotSupported
++        TraversalTDeserializationNotSupported,
++
++        /// <summary>
++        /// Problem not yet classified and needs additional review.
++        /// </summary>
+         NeedsFurtherInvestigation
      }
  }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/feature-steps.js
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-python/src/main/jython/gremlin_python/process/traversal.py
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --cc gremlin-python/src/main/jython/radish/feature_steps.py
index 3de641e,3ba88a2..e29607d
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@@ -36,10 -36,20 +36,22 @@@ regex_or = re.compile(r"([(.,\s])or\("
  regex_true = re.compile(r"(true)")
  regex_false = re.compile(r"(false)")
  
+ outV = __.outV
+ label = __.label
+ inV = __.inV
+ project = __.project
+ tail = __.tail
  
  ignores = [
-     "g.V(v1Id).out().inject(v2).values(\"name\")"  # bug in attachment won't connect v2
-            ]
+     "g.V(v1Id).out().inject(v2).values(\"name\")",  # bug in attachment won't connect v2
+     # TINKERPOP-1859 - for the following...seems to be related to P.not processing
+     "g.V().hasLabel(\"person\").has(\"age\", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values(\"name\")",
+     "g.V(v1Id).out().aggregate(\"x\").out().where(P.not(P.within(\"x\")))",
+     "g.V().as(\"a\").out().as(\"b\").where(__.and(__.as(\"a\").out(\"knows\").as(\"b\"), __.or(__.as(\"b\").out(\"created\").has(\"name\", \"ripple\"), __.as(\"b\").in(\"knows\").count().is(P.not(P.eq(0)))))).select(\"a\", \"b\")",
 -    "g.V().as(\"a\").out(\"created\").as(\"b\").in(\"created\").as(\"c\").both(\"knows\").both(\"knows\").as(\"d\").where(\"c\", P.not(P.eq(\"a\").or(P.eq(\"d\")))).select(\"a\", \"b\", \"c\", \"d\")"
 -           ]
++    "g.V().as(\"a\").out(\"created\").as(\"b\").in(\"created\").as(\"c\").both(\"knows\").both(\"knows\").as(\"d\").where(\"c\", P.not(P.eq(\"a\").or(P.eq(\"d\")))).select(\"a\", \"b\", \"c\", \"d\")",
++    # not sure yet
++    "g.V(v1).hasLabel(\"person\").map(l1).order(Scope.local).by(Column.values, Order.decr).by(Column.keys, Order.incr)"
++    ]
  
  
  @given("the {graph_name:w} graph")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-python/src/main/jython/radish/terrain.py
----------------------------------------------------------------------
diff --cc gremlin-python/src/main/jython/radish/terrain.py
index d5a4c16,4db443e..ba8f372
--- a/gremlin-python/src/main/jython/radish/terrain.py
+++ b/gremlin-python/src/main/jython/radish/terrain.py
@@@ -17,10 -17,8 +17,9 @@@ specific language governing permission
  under the License.
  '''
  
- import re
  from gremlin_python.structure.graph import Graph
  from gremlin_python.process.graph_traversal import __
 +from gremlin_python.driver import serializer
  from gremlin_python.driver.driver_remote_connection import DriverRemoteConnection
  from radish import before, after, world
  

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-server/src/test/scripts/test-server-start.groovy
----------------------------------------------------------------------
diff --cc gremlin-server/src/test/scripts/test-server-start.groovy
index 00ebb59,1cb2c53..1e2b012
--- a/gremlin-server/src/test/scripts/test-server-start.groovy
+++ b/gremlin-server/src/test/scripts/test-server-start.groovy
@@@ -30,7 -30,8 +30,8 @@@ settings.graphs.classic = gremlinServer
  settings.graphs.modern = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settings.graphs.crew = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settings.graphs.grateful = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
+ settings.graphs.sink = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 -settings.scriptEngines["gremlin-groovy"].scripts = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
 +settings.scriptEngines["gremlin-groovy"].plugins["org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin"].files = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
  if (Boolean.parseBoolean(python)) {
      settings.scriptEngines["gremlin-python"] = new Settings.ScriptEngineSettings()
      settings.scriptEngines["gremlin-jython"] = new Settings.ScriptEngineSettings()
@@@ -58,7 -50,8 +59,8 @@@ settingsSecure.graphs.classic = gremlin
  settingsSecure.graphs.modern = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settingsSecure.graphs.crew = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
  settingsSecure.graphs.grateful = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
+ settingsSecure.graphs.sink = gremlinServerDir + "/src/test/scripts/tinkergraph-empty.properties"
 -settingsSecure.scriptEngines["gremlin-groovy"].scripts = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
 +settingsSecure.scriptEngines["gremlin-groovy"].plugins["org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin"].files = [gremlinServerDir + "/src/test/scripts/generate-all.groovy"]
  if (Boolean.parseBoolean(python)) {
      settingsSecure.scriptEngines["gremlin-python"] = new Settings.ScriptEngineSettings()
      settingsSecure.scriptEngines["gremlin-jython"] = new Settings.ScriptEngineSettings()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-test/features/filter/Range.feature
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1c49c274/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
----------------------------------------------------------------------


[24/27] tinkerpop git commit: TINKERPOP-1857 Removed duplicate test in select() GLV tests

Posted by sp...@apache.org.
TINKERPOP-1857 Removed duplicate test in select() GLV tests


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

Branch: refs/heads/master
Commit: bdd5e4c25c16dbea08f6127e9d12dffc3397f818
Parents: 97d4511
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 9 09:44:25 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/map/Select.feature | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/bdd5e4c2/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index 94c4f22..d77e21f 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -338,7 +338,7 @@ Feature: Step - select()
       | marko |
       | marko |
 
-  Scenario: get_g_V_outE_weight_groupCount_selectXkeysX_unfold
+  Scenario: g_V_outE_weight_groupCount_selectXkeysX_unfold
     Given the modern graph
     And the traversal of
       """
@@ -514,18 +514,4 @@ Feature: Step - select()
     Then the result should be unordered
       | result |
       | d[2].l |
-      | d[2].l |
-
-  Scenario: g_V_outE_weight_groupCount_selectXkeysX_unfold
-    Given the modern graph
-    And the traversal of
-      """
-      g.V().outE().values("weight").groupCount().select(Column.keys).unfold()
-      """
-    When iterated to list
-    Then the result should be unordered
-      | result |
-      | d[0.5].f |
-      | d[1.0].f |
-      | d[0.4].f |
-      | d[0.2].f |
\ No newline at end of file
+      | d[2].l |
\ No newline at end of file


[05/27] tinkerpop git commit: TINKERPOP-1857 General test naming fixes and other inconsistencies

Posted by sp...@apache.org.
TINKERPOP-1857 General test naming fixes and other inconsistencies


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

Branch: refs/heads/master
Commit: 1425f2948d5f54960ecf27dfacd6c020b7adcf72
Parents: 7f39b18
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Dec 27 13:18:15 2017 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/branch/Union.feature      |  2 +-
 gremlin-test/features/filter/Filter.feature     | 24 ++++++
 gremlin-test/features/filter/Has.feature        |  4 +-
 .../traversal/step/branch/LocalTest.java        |  2 +-
 .../traversal/step/branch/RepeatTest.java       |  2 +-
 .../traversal/step/branch/UnionTest.java        |  4 +-
 .../process/traversal/step/filter/AndTest.java  |  4 +-
 .../traversal/step/filter/FilterTest.java       |  9 ++-
 .../gremlin/process/FeatureCoverageTest.java    | 78 +++++++++++++++++++-
 9 files changed, 117 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1425f294/gremlin-test/features/branch/Union.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/branch/Union.feature b/gremlin-test/features/branch/Union.feature
index 30eb53c..564e6b5 100644
--- a/gremlin-test/features/branch/Union.feature
+++ b/gremlin-test/features/branch/Union.feature
@@ -121,7 +121,7 @@ Feature: Step - union()
       | d[1.9].d |
       | d[1].l   |
 
-  Scenario: get_g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX
+  Scenario: g_VX1_2X_localXunionXoutE_count__inE_count__outE_weight_sumXX
     Given the modern graph
     And using the parameter v1Id defined as "v[marko].id"
     And using the parameter v2Id defined as "v[vadas].id"

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1425f294/gremlin-test/features/filter/Filter.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Filter.feature b/gremlin-test/features/filter/Filter.feature
index 76a5d7d..b552578 100644
--- a/gremlin-test/features/filter/Filter.feature
+++ b/gremlin-test/features/filter/Filter.feature
@@ -57,6 +57,30 @@ Feature: Step - filter()
       | v[ripple] |
       | v[lop]  |
 
+  Scenario: g_VX1X_filterXage_gt_30X
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter l1 defined as "c[it.get().property('age').orElse(0) > 30]"
+    And the traversal of
+      """
+      g.V(v1Id).filter(l1)
+      """
+    When iterated to list
+    Then the result should be empty
+
+  Scenario: g_VX2X_filterXage_gt_30X
+    Given the modern graph
+    And using the parameter v2Id defined as "v[josh].id"
+    And using the parameter l1 defined as "c[it.get().property('age').orElse(0) > 30]"
+    And the traversal of
+      """
+      g.V(v2Id).filter(l1)
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[josh] |
+
   Scenario: g_VX1X_out_filterXage_gt_30X
     Given the modern graph
     And using the parameter v1Id defined as "v[marko].id"

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1425f294/gremlin-test/features/filter/Has.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Has.feature b/gremlin-test/features/filter/Has.feature
index 55b46a7..bdede6d 100644
--- a/gremlin-test/features/filter/Has.feature
+++ b/gremlin-test/features/filter/Has.feature
@@ -17,7 +17,7 @@
 
 Feature: Step - has()
 
-  Scenario: Use has() with P.gt()
+  Scenario: g_V_hasXage_gt_30X
     Given the modern graph
     And the traversal of
       """
@@ -29,7 +29,7 @@ Feature: Step - has()
       | v[josh] |
       | v[peter] |
 
-  Scenario: Use hasId() with P
+  Scenario: g_V_in_hasIdXneqX1XX
     Given the modern graph
     And using the parameter v1 defined as "v[marko].id"
     And the traversal of

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1425f294/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/LocalTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/LocalTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/LocalTest.java
index c202a9c..faec45e 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/LocalTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/LocalTest.java
@@ -86,7 +86,7 @@ public abstract class LocalTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_hasXlabel_personX_asXaX_localXoutXcreatedX_asXbXX_selectXa_bX_byXnameX_by() {
+    public void g_V_hasXlabel_personX_asXaX_localXoutXcreatedX_asXbXX_selectXa_bX_byXnameX_byXidX() {
         final Traversal<Vertex, Map<String, Object>> traversal = get_g_V_hasXlabel_personX_asXaX_localXoutXcreatedX_asXbXX_selectXa_bX_byXnameX_byXidX();
         printTraversalForm(traversal);
         int counter = 0;

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1425f294/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatTest.java
index 75bb83f..6d90687 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/RepeatTest.java
@@ -297,7 +297,7 @@ public abstract class RepeatTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_VXX_hasXname_markoX_repeatXoutEXX_inVXX_simplePathXXX_untilXhasXname_rippleXX_limitX1X_pathXX_byXvaluesXnameXX_byXT_labelX() {
+    public void g_V_hasXname_markoX_repeatXoutE_inV_simplePathX_untilXhasXname_rippleXX_path_byXnameX_byXlabelX() {
         final Traversal<Vertex, Path> traversal = get_g_V_hasXname_markoX_repeatXoutE_inV_simplePathX_untilXhasXname_rippleXX_path_byXnameX_byXlabelX();
         printTraversalForm(traversal);
         final Path path = traversal.next();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1425f294/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/UnionTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/UnionTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/UnionTest.java
index 03abc03..1c06943 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/UnionTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/branch/UnionTest.java
@@ -87,7 +87,7 @@ public abstract class UnionTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_chooseXlabel_eq_person__unionX__out_lang__out_nameX__in_labelX() {
+    public void g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX() {
         final Traversal<Vertex, String> traversal = get_g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX();
         printTraversalForm(traversal);
         checkResults(new HashMap<String, Long>() {{
@@ -102,7 +102,7 @@ public abstract class UnionTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_chooseXlabel_eq_person__unionX__out_lang__out_nameX__in_labelX_groupCount() {
+    public void g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX_groupCount() {
         final Traversal<Vertex, Map<String, Long>> traversal = get_g_V_chooseXlabel_is_person__unionX__out_lang__out_nameX__in_labelX_groupCount();
         printTraversalForm(traversal);
         final Map<String, Long> groupCount = traversal.next();

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1425f294/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndTest.java
index 863b602..59a8ec8 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/AndTest.java
@@ -54,7 +54,7 @@ public abstract class AndTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_andXhasXage_gt_27X__outE_count_gt_2X_name() {
+    public void g_V_andXhasXage_gt_27X__outE_count_gte_2X_name() {
         final Traversal<Vertex, String> traversal = get_g_V_andXhasXage_gt_27X__outE_count_gte_2X_name();
         printTraversalForm(traversal);
         checkResults(Arrays.asList("marko", "josh"), traversal);
@@ -62,7 +62,7 @@ public abstract class AndTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_andXout__hasXlabel_personX_and_hasXage_gte_32XX_name() {
+    public void g_V_andXoutE__hasXlabel_personX_and_hasXage_gte_32XX_name() {
         final Traversal<Vertex, String> traversal = get_g_V_andXoutE__hasXlabel_personX_and_hasXage_gte_32XX_name();
         printTraversalForm(traversal);
         checkResults(Arrays.asList("josh", "peter"), traversal);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1425f294/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/FilterTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/FilterTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/FilterTest.java
index d2e05b8..d8663df 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/FilterTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/FilterTest.java
@@ -103,10 +103,15 @@ public abstract class FilterTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_VX1X_filterXage_gt_30X() {
-        Traversal<Vertex, Vertex> traversal = get_g_VX1X_filterXage_gt_30X(convertToVertexId("marko"));
+        final Traversal<Vertex, Vertex> traversal = get_g_VX1X_filterXage_gt_30X(convertToVertexId("marko"));
         printTraversalForm(traversal);
         assertFalse(traversal.hasNext());
-        traversal = get_g_VX1X_filterXage_gt_30X(convertToVertexId("josh"));
+    }
+
+    @Test
+    @LoadGraphWith(MODERN)
+    public void g_VX2X_filterXage_gt_30X() {
+        final  Traversal<Vertex, Vertex> traversal = get_g_VX1X_filterXage_gt_30X(convertToVertexId("josh"));
         printTraversalForm(traversal);
         assertTrue(traversal.hasNext());
         assertEquals(Integer.valueOf(32), traversal.next().<Integer>value("age"));

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/1425f294/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index cc6e9bd..36b2b29 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -20,20 +20,55 @@ package org.apache.tinkerpop.gremlin.process;
 
 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.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.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.ProjectTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PropertiesTest;
+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.sideEffect.AggregateTest;
 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.junit.Ignore;
 import org.junit.Test;
@@ -66,7 +101,7 @@ public class FeatureCoverageTest {
     private static Pattern scenarioName = Pattern.compile("^\\s*Scenario:\\s*(.*)$");
 
     @Test
-    @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")
+    // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")
     public void shouldImplementAllProcessTestsAsFeatures() throws Exception {
 
         // TEMPORARY while test framework is under development - all tests should ultimately be included
@@ -74,24 +109,65 @@ public class FeatureCoverageTest {
                 // branch
                 BranchTest.class,
                 ChooseTest.class,
+                LocalTest.class,
                 OptionalTest.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,
+                FlatMapTest.class,
+                FoldTest.class,
+                GraphTest.class,
+                LoopsTest.class,
+                MapTest.class,
+                MatchTest.class,
+                MaxTest.class,
+                MeanTest.class,
+                MinTest.class,
+                OrderTest.class,
+                PageRankTest.class,
                 PathTest.class,
+                // PeerPressureTest.class,
+                // ProfileTest.class,
+                // ProgramTest.class,
                 ProjectTest.class,
+                PropertiesTest.class,
+                SelectTest.class,
+                SumTest.class,
+                UnfoldTest.class,
                 ValueMapTest.class,
                 VertexTest.class,
                 // sideEffect
                 AggregateTest.class,
+                // ExplainTest.class,
                 GroupCountTest.class,
+                GroupTest.class,
                 InjectTest.class,
+                SackTest.class,
+                SideEffectCapTest.class,
+                SideEffectTest.class,
                 StoreTest.class);
+                // SubgraphTest.class,
+                // TreeTest.class);
 
         final Field field = ProcessStandardSuite.class.getDeclaredField("testsToEnforce");
         field.setAccessible(true);


[02/27] tinkerpop git commit: TINKERPOP-1857 Added new GLV min() test that came in after rebase

Posted by sp...@apache.org.
TINKERPOP-1857 Added new GLV min() test that came in after rebase


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

Branch: refs/heads/master
Commit: 2735643fb1811be3426900d2df64795430f9eedf
Parents: ade1daf
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 1 13:33:12 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 gremlin-test/features/map/Min.feature | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/2735643f/gremlin-test/features/map/Min.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Min.feature b/gremlin-test/features/map/Min.feature
index 203a6f1..99d53dd 100644
--- a/gremlin-test/features/map/Min.feature
+++ b/gremlin-test/features/map/Min.feature
@@ -49,3 +49,14 @@ Feature: Step - min()
     Then the result should be unordered
       | result |
       | m[{"ripple":"d[1.0].d","lop":"d[0.2].d"}] |
+
+  Scenario: g_V_foo_injectX9999999999X_min
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().values("foo").inject(9999999999L).min()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[9999999999].l |


[20/27] tinkerpop git commit: TINKERPOP-1857 select() GLV tests

Posted by sp...@apache.org.
TINKERPOP-1857 select() GLV tests


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

Branch: refs/heads/master
Commit: 43519778b0f0c71a93ff0d91efc153995e1ebec6
Parents: 314481e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 6 09:08:55 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../src/main/jython/radish/feature_steps.py     |   3 +-
 gremlin-test/features/map/Properties.feature    |  16 +-
 gremlin-test/features/map/Select.feature        | 209 ++++++++++++++++++-
 .../process/traversal/step/map/SelectTest.java  |   2 +-
 .../gremlin/process/FeatureCoverageTest.java    |  13 +-
 5 files changed, 224 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43519778/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index e6392d5..7c0525f 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -21,7 +21,7 @@ import json
 import re
 from gremlin_python.structure.graph import Graph, Path
 from gremlin_python.process.graph_traversal import __
-from gremlin_python.process.traversal import Cardinality, P, Scope, Column, Order, Direction, T, Pick, Operator
+from gremlin_python.process.traversal import Cardinality, P, Pop, Scope, Column, Order, Direction, T, Pick, Operator
 from radish import given, when, then
 from hamcrest import *
 
@@ -259,6 +259,7 @@ def _make_traversal(g, traversal_string, params):
          "Order": Order,
          "P": P,
          "Pick": Pick,
+         "Pop": Pop,
          "Scope": Scope,
          "Operator": Operator,
          "T": T}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43519778/gremlin-test/features/map/Properties.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Properties.feature b/gremlin-test/features/map/Properties.feature
index 58a5531..3c926fa 100644
--- a/gremlin-test/features/map/Properties.feature
+++ b/gremlin-test/features/map/Properties.feature
@@ -51,18 +51,4 @@ Feature: Step - properties()
       | josh  |
       | d[32].i |
       | peter |
-      | d[35].i |
-
-  Scenario: g_V_hasXageX_properties_hasXid_nameIdX_value
-    Given an unsupported test
-    Then nothing should happen because
-      """
-      There is no way to currently get property identifiers on elements.
-      """
-
-  Scenario: g_V_hasXageX_propertiesXnameX
-    Given an unsupported test
-    Then nothing should happen because
-      """
-      There is no way to currently assert property elements in the test logic.
-      """
+      | d[35].i |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43519778/gremlin-test/features/map/Select.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/Select.feature b/gremlin-test/features/map/Select.feature
index 06f00d2..94c4f22 100644
--- a/gremlin-test/features/map/Select.feature
+++ b/gremlin-test/features/map/Select.feature
@@ -321,4 +321,211 @@ Feature: Step - select()
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"ripple":"d[1].l", "lop":"d[6].l"}] |
\ No newline at end of file
+      | m[{"ripple":"d[1].l", "lop":"d[6].l"}] |
+
+  Scenario: g_V_untilXout_outX_repeatXin_asXaXX_selectXaX_byXtailXlocalX_nameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().until(__.out().out()).repeat(__.in().as("a")).select("a").by(__.tail(Scope.local).values("name"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+      | marko |
+      | marko |
+      | marko |
+      | marko |
+
+  Scenario: get_g_V_outE_weight_groupCount_selectXkeysX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().select(Column.keys).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[0.5].f |
+      | d[1.0].f |
+      | d[0.4].f |
+      | d[0.2].f |
+
+  Scenario: g_V_hasLabelXsoftwareX_asXnameX_asXlanguageX_asXcreatorsX_selectXname_language_creatorsX_byXnameX_byXlangX_byXinXcreatedX_name_fold_orderXlocalXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().hasLabel("software").as("name").as("language").as("creators").select("name", "language", "creators").by("name").by("lang").
+                    by(__.in("created").values("name").fold().order(Scope.local))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"name":"lop","language":"java","creators":["josh","marko","peter"]}] |
+      | m[{"name":"ripple","language":"java","creators":["josh"]}] |
+
+  Scenario: g_V_outE_weight_groupCount_unfold_selectXkeysX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().unfold().select(Column.keys).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[0.5].f |
+      | d[1.0].f |
+      | d[0.4].f |
+      | d[0.2].f |
+
+  Scenario: g_V_outE_weight_groupCount_unfold_selectXvaluesX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().unfold().select(Column.values).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1].l |
+      | d[2].l |
+      | d[2].l |
+      | d[1].l |
+
+  Scenario: g_V_untilXout_outX_repeatXin_asXaX_in_asXbXX_selectXa_bX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().until(__.out().out()).repeat(__.in().as("a").in().as("b")).select("a", "b").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"josh","b":"marko"}] |
+      | m[{"a":"josh","b":"marko"}] |
+
+  Scenario: g_V_outE_weight_groupCount_selectXvaluesX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().select(Column.values).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1].l |
+      | d[2].l |
+      | d[2].l |
+      | d[1].l |
+
+  Scenario: g_VX1X_asXaX_outXknowsX_asXbX_selectXa_bX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("knows").as("b").select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"v[vadas]"}] |
+      | m[{"a":"v[marko]","b":"v[josh]"}] |
+
+  Scenario: g_V_asXaX_whereXoutXknowsXX_selectXaX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").where(__.out("knows")).select("a")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+
+  Scenario: g_VX1X_asXaX_repeatXout_asXaXX_timesX2X_selectXfirst_aX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").repeat(__.out().as("a")).times(2).select(Pop.first, "a")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[marko] |
+      | v[marko] |
+
+  Scenario: g_V_asXaX_outXknowsX_asXbX_localXselectXa_bX_byXnameXX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out("knows").as("b").local(__.select("a", "b").by("name"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"marko","b":"vadas"}] |
+      | m[{"a":"marko","b":"josh"}] |
+
+  Scenario: g_VX1X_asXaX_repeatXout_asXaXX_timesX2X_selectXlast_aX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").repeat(__.out().as("a")).times(2).select(Pop.last, "a")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[ripple] |
+      | v[lop] |
+
+  Scenario: g_VX1X_outEXknowsX_asXhereX_hasXweight_1X_inV_hasXname_joshX_selectXhereX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).outE("knows").as("here").has("weight", 1.0).inV().has("name", "josh").select("here")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | e[marko-knows->josh] |
+
+  Scenario: g_V_asXaX_hasXname_markoX_asXbX_asXcX_selectXa_b_cX_by_byXnameX_byXageX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").has("name", "marko").as("b").as("c").select("a", "b", "c").by().by("name").by("age")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a":"v[marko]","b":"marko","c":"d[29].i"}] |
+
+  Scenario: g_V_outE_weight_groupCount_selectXvaluesX_unfold_groupCount_selectXvaluesX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().select(Column.values).unfold().groupCount().select(Column.values).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[2].l |
+      | d[2].l |
+
+  Scenario: g_V_outE_weight_groupCount_selectXkeysX_unfold
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().outE().values("weight").groupCount().select(Column.keys).unfold()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[0.5].f |
+      | d[1.0].f |
+      | d[0.4].f |
+      | d[0.2].f |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43519778/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
index 6d07edf..c0486d0 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/SelectTest.java
@@ -567,7 +567,7 @@ public abstract class SelectTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_asXaX_whereXoutXknowsXX_selectXaX_byXnameX() {
+    public void g_V_asXaX_whereXoutXknowsXX_selectXaX() {
         final Traversal<Vertex, Vertex> traversal = get_g_V_asXaX_whereXoutXknowsXX_selectXaX();
         printTraversalForm(traversal);
         assertEquals(convertToVertex(graph, "marko"), traversal.next());

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/43519778/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index b2a83d7..9e6ca72 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -104,6 +104,10 @@ public class FeatureCoverageTest {
             // deprecated tests
             "g_V_addVXlabel_animal_age_0X",
             "g_addVXlabel_person_name_stephenX",
+            // GLV suite doesn't support property identifiers and related assertions
+            "g_V_hasXageX_properties_hasXid_nameIdX_value",
+            "g_V_hasXageX_properties_hasXid_nameIdAsStringX_value",
+            "g_V_hasXageX_propertiesXnameX",
             // grateful dead graph not supported in GLV suite
             "g_V_matchXa_0sungBy_b__a_0writtenBy_c__b_writtenBy_d__c_sungBy_d__d_hasXname_GarciaXX",
             "g_V_matchXa_hasXsong_name_sunshineX__a_mapX0followedBy_weight_meanX_b__a_0followedBy_c__c_filterXweight_whereXgteXbXXX_outV_dX_selectXdX_byXnameX",
@@ -115,7 +119,14 @@ public class FeatureCoverageTest {
             "get_g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
             "g_V_matchXa_followedBy_count_isXgtX10XX_b__a_0followedBy_count_isXgtX10XX_bX_count",
             "g_V_hasXsong_name_OHBOYX_outXfollowedByX_outXfollowedByX_order_byXperformancesX_byXsongType_incrX",
-            "g_V_hasLabelXsongX_order_byXperfomances_decrX_byXnameX_rangeX110_120X_name");
+            "g_V_hasLabelXsongX_order_byXperfomances_decrX_byXnameX_rangeX110_120X_name",
+            // Pop tests not organized right for GLVs
+            "g_V_valueMap_selectXpop_aX",
+            "g_V_selectXa_bX",
+            "g_V_valueMap_selectXpop_a_bX",
+            "g_V_selectXaX",
+            // assertion doesn't seem to want to work right for embedded lists
+            "g_V_asXa_bX_out_asXcX_path_selectXkeysX");
 
     @Test
     // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")


[25/27] tinkerpop git commit: TINKERPOP-1857 sack() inject() cap() GLV tests

Posted by sp...@apache.org.
TINKERPOP-1857 sack() inject() cap() GLV tests


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

Branch: refs/heads/master
Commit: 5db5f2188137c8088f3433910cf48f6bb1e2eb6b
Parents: 4351977
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 6 10:55:14 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:10 2018 -0500

----------------------------------------------------------------------
 .../src/main/jython/radish/feature_steps.py     |  3 +-
 gremlin-test/features/sideEffect/Inject.feature | 17 ++++++++
 gremlin-test/features/sideEffect/Sack.feature   | 42 +++++++++++++++++++-
 .../features/sideEffect/SideEffectCap.feature   |  8 ++--
 .../gremlin/process/FeatureCoverageTest.java    | 15 +++++--
 5 files changed, 76 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5db5f218/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index 7c0525f..3ba88a2 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -21,7 +21,7 @@ import json
 import re
 from gremlin_python.structure.graph import Graph, Path
 from gremlin_python.process.graph_traversal import __
-from gremlin_python.process.traversal import Cardinality, P, Pop, Scope, Column, Order, Direction, T, Pick, Operator
+from gremlin_python.process.traversal import Barrier, Cardinality, P, Pop, Scope, Column, Order, Direction, T, Pick, Operator
 from radish import given, when, then
 from hamcrest import *
 
@@ -253,6 +253,7 @@ def _translate(traversal):
 def _make_traversal(g, traversal_string, params):
     b = {"g": g,
          "__": __,
+         "Barrier": Barrier,
          "Cardinality": Cardinality,
          "Column": Column,
          "Direction": Direction,

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5db5f218/gremlin-test/features/sideEffect/Inject.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/Inject.feature b/gremlin-test/features/sideEffect/Inject.feature
index 61ffb58..740928d 100644
--- a/gremlin-test/features/sideEffect/Inject.feature
+++ b/gremlin-test/features/sideEffect/Inject.feature
@@ -49,3 +49,20 @@ Feature: Step - inject()
       | p[v[marko],v[lop],lop,d[3].i] |
       | p[v[marko],v[vadas],vadas,d[5].i] |
       | p[v[marko],v[josh],josh,d[4].i] |
+
+  Scenario: g_VX1X_injectXg_VX4XX_out_name
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter v4 defined as "v[josh]"
+    And the traversal of
+      """
+      g.V(v1Id).inject(v4).out().values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | ripple |
+      | lop   |
+      | lop   |
+      | vadas |
+      | josh  |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5db5f218/gremlin-test/features/sideEffect/Sack.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/Sack.feature b/gremlin-test/features/sideEffect/Sack.feature
index 73e65da..f5baf64 100644
--- a/gremlin-test/features/sideEffect/Sack.feature
+++ b/gremlin-test/features/sideEffect/Sack.feature
@@ -68,4 +68,44 @@ Feature: Step - sack()
     Then nothing should happen because
       """
       This API is deprecated - will not test.
-      """
\ No newline at end of file
+      """
+
+  Scenario: g_withBulkXfalseX_withSackX1_sumX_VX1X_localXoutEXknowsX_barrierXnormSackX_inVX_inXknowsX_barrier_sack
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.withBulk(false).withSack(1.0, Operator.sum).V(v1Id).local(__.outE("knows").barrier(Barrier.normSack).inV()).in("knows").barrier().sack()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1.0].d |
+
+  Scenario: g_withBulkXfalseX_withSackX1_sumX_V_out_barrier_sack
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.withBulk(false).withSack(1, Operator.sum).V().out().barrier().sack()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[3].l |
+      | d[1].l |
+      | d[1].l |
+      | d[1].l |
+
+  Scenario: g_withSackX1_sumX_VX1X_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.withSack(1.0, Operator.sum).V(v1Id).local(__.out("knows").barrier(Barrier.normSack)).in("knows").barrier().sack()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | d[1.0].d |
+      | d[1.0].d |
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5db5f218/gremlin-test/features/sideEffect/SideEffectCap.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/sideEffect/SideEffectCap.feature b/gremlin-test/features/sideEffect/SideEffectCap.feature
index 6be2fdb..795db7e 100644
--- a/gremlin-test/features/sideEffect/SideEffectCap.feature
+++ b/gremlin-test/features/sideEffect/SideEffectCap.feature
@@ -17,17 +17,17 @@
 
 Feature: Step - cap()
 
-  Scenario: g_V_group_byXnameX
+  Scenario: g_V_hasXageX_groupCountXaX_byXnameX_out_capXaX
     Given the modern graph
     And the traversal of
       """
-      g.V().group().by("name")
+      g.V().has("age").groupCount("a").by("name").out().cap("a")
       """
     When iterated to list
     Then the result should be unordered
       | result |
-      | m[{"ripple":"l[v[ripple]]", "vadas":"l[v[vadas]]", "lop":"l[v[lop]]", "peter": "l[v[peter]]", "josh": "l[v[josh]]", "marko":"l[v[marko]]"}] |
-    
+      | m[{"peter":"d[1].i", "vadas":"d[1].i", "josh":"d[1].i", "marko": "d[1].i"}] |
+
   Scenario: g_V_chooseXlabel_person__age_groupCountXaX__name_groupCountXbXX_capXa_bX
     Given an unsupported test
     Then nothing should happen because

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/5db5f218/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 9e6ca72..28c6d77 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -126,7 +126,16 @@ public class FeatureCoverageTest {
             "g_V_valueMap_selectXpop_a_bX",
             "g_V_selectXaX",
             // assertion doesn't seem to want to work right for embedded lists
-            "g_V_asXa_bX_out_asXcX_path_selectXkeysX");
+            "g_V_asXa_bX_out_asXcX_path_selectXkeysX",
+            // probably need TINKERPOP-1877
+            "g_V_bothEXselfX",
+            "g_V_bothXselfX",
+            // ugh - BigInteger?
+            "g_withSackXBigInteger_TEN_powX1000X_assignX_V_localXoutXknowsX_barrierXnormSackXX_inXknowsX_barrier_sack",
+            // ugh - clone
+            "g_withSackXmap__map_cloneX_V_out_out_sackXmap_a_nameX_sack",
+            // wont round right or something
+            "g_withSackX2X_V_sackXdivX_byXconstantX3_0XX_sack");
 
     @Test
     // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")
@@ -192,7 +201,7 @@ public class FeatureCoverageTest {
                 InjectTest.class,
                 SackTest.class,
                 SideEffectCapTest.class,
-                SideEffectTest.class,
+                //SideEffectTest.class,
                 StoreTest.class);
                 // SubgraphTest.class,
                 // TreeTest.class);
@@ -214,7 +223,7 @@ public class FeatureCoverageTest {
                     .map(Method::getName).collect(Collectors.toSet());
 
             final File featureFile = new File(featureFileName);
-            assertThat(featureFile.exists(), is(true));
+            assertThat("Where is: " + featureFileName, featureFile.exists(), is(true));
             assertThat(featureFile.isFile(), is(true));
 
             final Set<String> testsInFeatureFile = new HashSet<>();


[10/27] tinkerpop git commit: TINKERPOP-1857 Added where() GLV test

Posted by sp...@apache.org.
TINKERPOP-1857 Added where() GLV test


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

Branch: refs/heads/master
Commit: 784c3d10dbe40a4acf7cac93abba03977631acb1
Parents: d556f77
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Jan 24 12:14:01 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 .../src/main/jython/radish/feature_steps.py     |   6 +-
 gremlin-test/features/filter/Where.feature      | 195 +++++++++++++++++++
 .../traversal/step/filter/WhereTest.java        |  10 +-
 3 files changed, 205 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/784c3d10/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index c0574d0..06a8ec9 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -44,7 +44,11 @@ tail = __.tail
 
 ignores = [
     "g.V(v1Id).out().inject(v2).values(\"name\")",  # bug in attachment won't connect v2
-    "g.V().hasLabel(\"person\").has(\"age\", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values(\"name\")" # TINKERPOP-1859
+    # TINKERPOP-1859 - for the following...seems to be related to P.not processing
+    "g.V().hasLabel(\"person\").has(\"age\", P.not(P.lte(d10).and(P.not(P.between(d11, d20)))).and(P.lt(d29).or(P.eq(d35)))).values(\"name\")",
+    "g.V(v1Id).out().aggregate(\"x\").out().where(P.not(P.within(\"x\")))",
+    "g.V().as(\"a\").out().as(\"b\").where(__.and(__.as(\"a\").out(\"knows\").as(\"b\"), __.or(__.as(\"b\").out(\"created\").has(\"name\", \"ripple\"), __.as(\"b\").in(\"knows\").count().is(P.not(P.eq(0)))))).select(\"a\", \"b\")",
+    "g.V().as(\"a\").out(\"created\").as(\"b\").in(\"created\").as(\"c\").both(\"knows\").both(\"knows\").as(\"d\").where(\"c\", P.not(P.eq(\"a\").or(P.eq(\"d\")))).select(\"a\", \"b\", \"c\", \"d\")"
            ]
 
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/784c3d10/gremlin-test/features/filter/Where.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/filter/Where.feature b/gremlin-test/features/filter/Where.feature
index c13703c..912edf2 100644
--- a/gremlin-test/features/filter/Where.feature
+++ b/gremlin-test/features/filter/Where.feature
@@ -129,3 +129,198 @@ Feature: Step - where()
       | josh |
       | d[32].i |
 
+  Scenario: g_VX1X_asXaX_outXcreatedX_inXcreatedX_whereXeqXaXX_name
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("created").in("created").where(P.eq("a")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+
+  Scenario: g_VX1X_asXaX_outXcreatedX_inXcreatedX_whereXneqXaXX_name
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out("created").in("created").where(P.neq("a")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | peter |
+      | josh  |
+
+  Scenario: g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).out().aggregate("x").out().where(P.not(P.within("x")))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[ripple] |
+
+  Scenario: g_withSideEffectXa_g_VX2XX_VX1X_out_whereXneqXaXX
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And using the parameter v2 defined as "v[vadas]"
+    And the traversal of
+      """
+      g.withSideEffect("a", v2).V(v1Id).out().where(P.neq("a"))
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | v[josh] |
+      | v[lop] |
+
+  Scenario: g_VX1X_repeatXbothEXcreatedX_whereXwithoutXeXX_aggregateXeX_otherVX_emit_path
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).repeat(__.bothE("created").where(P.without("e")).aggregate("e").otherV()).emit().path()
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | p[v[marko],e[marko-created->lop],v[lop]] |
+      | p[v[marko],e[marko-created->lop],v[lop],e[josh-created->lop],v[josh]] |
+      | p[v[marko],e[marko-created->lop],v[lop],e[peter-created->lop],v[peter]] |
+      | p[v[marko],e[marko-created->lop],v[lop],e[josh-created->lop],v[josh],e[josh-created->ripple],v[ripple]] |
+
+  Scenario: g_V_whereXnotXoutXcreatedXXX_name
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().where(__.not(__.out("created"))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | vadas |
+      | lop |
+      | ripple |
+
+  Scenario: g_V_asXaX_out_asXbX_whereXandXasXaX_outXknowsX_asXbX__orXasXbX_outXcreatedX_hasXname_rippleX__asXbX_inXknowsX_count_isXnotXeqX0XXXXX_selectXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("b").where(__.and(__.as("a").out("knows").as("b"), __.or(__.as("b").out("created").has("name", "ripple"), __.as("b").in("knows").count().is(P.not(P.eq(0)))))).select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "v[marko]", "b": "v[vadas]"}] |
+      | m[{"a": "v[marko]", "b": "v[josh]"}] |
+
+  Scenario: g_V_whereXoutXcreatedX_and_outXknowsX_or_inXknowsXX_valuesXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().where(__.out("created").and().out("knows").or().in("knows")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+      | vadas |
+      | josh |
+
+  Scenario: g_V_asXaX_outXcreatedX_asXbX_whereXandXasXbX_in__notXasXaX_outXcreatedX_hasXname_rippleXXX_selectXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out("created").as("b").where(__.and(__.as("b").in(), __.not(__.as("a").out("created").has("name", "ripple")))).select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "v[marko]", "b": "v[lop]"}] |
+      | m[{"a": "v[peter]", "b": "v[lop]"}] |
+
+  Scenario: g_V_asXaX_outXcreatedX_asXbX_inXcreatedX_asXcX_bothXknowsX_bothXknowsX_asXdX_whereXc__notXeqXaX_orXeqXdXXXX_selectXa_b_c_dX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out("created").as("b").in("created").as("c").both("knows").both("knows").as("d").where("c", P.not(P.eq("a").or(P.eq("d")))).select("a", "b", "c", "d")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "v[marko]", "b": "v[lop]", "c": "v[josh]", "d": "v[vadas]"}] |
+      | m[{"a": "v[peter]", "b": "v[lop]", "c": "v[josh]", "d": "v[vadas]"}] |
+
+  Scenario: g_V_asXaX_out_asXbX_whereXin_count_isXeqX3XX_or_whereXoutXcreatedX_and_hasXlabel_personXXX_selectXa_bX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out().as("b").where(__.as("b").in().count().is(P.eq(3)).or().where(__.as("b").out("created").and().as("b").has(T.label, "person"))).select("a", "b")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "v[marko]", "b": "v[lop]"}] |
+      | m[{"a": "v[marko]", "b": "v[josh]"}] |
+      | m[{"a": "v[josh]", "b": "v[lop]"}] |
+      | m[{"a": "v[peter]", "b": "v[lop]"}] |
+
+  Scenario: g_V_asXaX_outXcreatedX_inXcreatedX_asXbX_whereXa_gtXbXX_byXageX_selectXa_bX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").out("created").in("created").as("b").where("a", P.gt("b")).by("age").select("a", "b").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "josh", "b": "marko"}] |
+      | m[{"a": "peter", "b": "marko"}] |
+      | m[{"a": "peter", "b": "josh"}] |
+
+  Scenario: g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_whereXa_gtXbX_orXeqXbXXX_byXageX_byXweightX_byXweightX_selectXa_cX_byXnameX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").outE("created").as("b").inV().as("c").where("a", P.gt("b").or(P.eq("b"))).by("age").by("weight").by("weight").select("a", "c").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "marko", "c": "lop"}] |
+      | m[{"a": "josh", "c": "ripple"}] |
+      | m[{"a": "josh", "c": "lop"}] |
+      | m[{"a": "peter", "c": "lop"}] |
+
+  Scenario: g_V_asXaX_outEXcreatedX_asXbX_inV_asXcX_inXcreatedX_asXdX_whereXa_ltXbX_orXgtXcXX_andXneqXdXXX_byXageX_byXweightX_byXinXcreatedX_valuesXageX_minX_selectXa_c_dX
+    Given the modern graph
+    And the traversal of
+      """
+      g.V().as("a").outE("created").as("b").inV().as("c").in("created").as("d").where("a", P.lt("b").or(P.gt("c")).and(P.neq("d"))).by("age").by("weight").by(__.in("created").values("age").min()).select("a", "c", "d").by("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"a": "josh", "c": "lop", "d": "marko"}] |
+      | m[{"a": "josh", "c": "lop", "d": "peter"}] |
+      | m[{"a": "peter", "c": "lop", "d": "marko"}] |
+      | m[{"a": "peter", "c": "lop", "d": "josh"}] |
+
+  Scenario: g_VX1X_asXaX_out_hasXageX_whereXgtXaXX_byXageX_name
+    Given the modern graph
+    And using the parameter v1Id defined as "v[marko].id"
+    And the traversal of
+      """
+      g.V(v1Id).as("a").out().has("age").where(P.gt("a")).by("age").values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | josh |
+

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/784c3d10/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 af46bc9..f7e706e 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
@@ -263,7 +263,7 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_VX1X_out_aggregateXxX_out_whereXwithout_xX() {
+    public void g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX() {
         final Traversal<Vertex, Vertex> traversal = get_g_VX1X_out_aggregateXxX_out_whereXnotXwithinXaXXX(convertToVertexId("marko"));
         printTraversalForm(traversal);
         assertEquals("ripple", traversal.next().<String>value("name"));
@@ -273,7 +273,7 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
     @Test
     @LoadGraphWith(MODERN)
     public void g_withSideEffectXa_g_VX2XX_VX1X_out_whereXneqXaXX() {
-        final Traversal<Vertex, Vertex> traversal = get_g_withSideEffectXa_graph_verticesX2XX_VX1X_out_whereXneqXaXX(convertToVertexId("marko"), convertToVertexId("vadas"));
+        final Traversal<Vertex, Vertex> traversal = get_g_withSideEffectXa_graph_verticesX2XX_VX1X_out_whereXneqXaXX(convertToVertexId("marko"), g.V(convertToVertexId("vadas")).next());
         printTraversalForm(traversal);
         int counter = 0;
         final Set<Vertex> vertices = new HashSet<>();
@@ -324,7 +324,7 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
 
     @Test
     @LoadGraphWith(MODERN)
-    public void g_V_whereXoutXcreatedX_and_outXknowsX_or_inXknowsXX_selectXaX_byXnameX() {
+    public void g_V_whereXoutXcreatedX_and_outXknowsX_or_inXknowsXX_valuesXnameX() {
         final Traversal<Vertex, String> traversal = get_g_V_whereXoutXcreatedX_and_outXknowsX_or_inXknowsXX_valuesXnameX();
         printTraversalForm(traversal);
         checkResults(Arrays.asList("marko", "vadas", "josh"), traversal);
@@ -471,8 +471,8 @@ public abstract class WhereTest extends AbstractGremlinProcessTest {
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_withSideEffectXa_graph_verticesX2XX_VX1X_out_whereXneqXaXX(final Object v1Id, final Object v2Id) {
-            return g.withSideEffect("a", g.V(v2Id).next()).V(v1Id).out().where(neq("a"));
+        public Traversal<Vertex, Vertex> get_g_withSideEffectXa_graph_verticesX2XX_VX1X_out_whereXneqXaXX(final Object v1Id, final Object v2) {
+            return g.withSideEffect("a", v2).V(v1Id).out().where(neq("a"));
         }
 
         @Override


[04/27] tinkerpop git commit: TINKERPOP-1857 Included GLV tests for addV()

Posted by sp...@apache.org.
TINKERPOP-1857 Included GLV tests for addV()


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

Branch: refs/heads/master
Commit: 7a445844c2cdb0aede731e2d88a592dafebcf9e6
Parents: 784c3d1
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Feb 1 10:28:35 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Feb 14 15:34:09 2018 -0500

----------------------------------------------------------------------
 .../step/map/GroovyAddVertexTest.groovy         |   5 -
 .../src/main/jython/radish/feature_steps.py     |   2 +-
 gremlin-test/features/map/AddVertex.feature     | 165 ++++++++++++++++++-
 .../traversal/step/map/AddVertexTest.java       |  27 +--
 .../gremlin/process/FeatureCoverageTest.java    |   7 +
 5 files changed, 174 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7a445844/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
----------------------------------------------------------------------
diff --git a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
index 00312fa..1956a7e 100644
--- a/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
+++ b/gremlin-groovy-test/src/main/groovy/org/apache/tinkerpop/gremlin/process/traversal/step/map/GroovyAddVertexTest.groovy
@@ -47,11 +47,6 @@ public abstract class GroovyAddVertexTest {
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX() {
-            new ScriptTraversal<>(g, "gremlin-groovy", "g.addV('person').property('name', 'stephen').property('name', 'stephenm')")
-        }
-
-        @Override
         public Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX() {
             new ScriptTraversal<>(g, "gremlin-groovy", "g.addV('person').property(VertexProperty.Cardinality.single, 'name', 'stephen').property(VertexProperty.Cardinality.single, 'name', 'stephenm')")
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7a445844/gremlin-python/src/main/jython/radish/feature_steps.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/feature_steps.py b/gremlin-python/src/main/jython/radish/feature_steps.py
index 06a8ec9..e6392d5 100644
--- a/gremlin-python/src/main/jython/radish/feature_steps.py
+++ b/gremlin-python/src/main/jython/radish/feature_steps.py
@@ -135,7 +135,7 @@ def assert_side_effects(step, count, traversal_string):
 
     t = _make_traversal(step.context.g, traversal_string.replace('\\"', '"'),
                         step.context.traversal_params if hasattr(step.context, "traversal_params") else {})
-    assert_that(count, equal_to(t.count().next()))
+    assert_that(t.count().next(), equal_to(count))
 
 
 @then("the result should have a count of {count:d}")

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7a445844/gremlin-test/features/map/AddVertex.feature
----------------------------------------------------------------------
diff --git a/gremlin-test/features/map/AddVertex.feature b/gremlin-test/features/map/AddVertex.feature
index 3335e29..2813733 100644
--- a/gremlin-test/features/map/AddVertex.feature
+++ b/gremlin-test/features/map/AddVertex.feature
@@ -144,4 +144,167 @@ Feature: Step - addV()
     Then the result should have a count of 1
     And the graph should return 0 for count of "g.V().has(\"person\",\"name\",\"stephen\")"
     And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"stephenm\")"
-    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"stephenm\").properties(\"name\").has(\"since\",2010)"
\ No newline at end of file
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"stephenm\").properties(\"name\").has(\"since\",2010)"
+
+  Scenario: g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.V().has("name", "marko").property("friendWeight", __.outE("knows").values("weight").sum(), "acl", "private")
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").has(\"friendWeight\", 1.5)"
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").properties(\"friendWeight\").has(\"acl\",\"private\")"
+    And the graph should return 1 for count of "g.V().has(\"person\",\"name\",\"marko\").properties(\"friendWeight\").count()"
+
+  Scenario: g_addVXanimalX_propertyXname_mateoX_propertyXname_gateoX_propertyXname_cateoX_propertyXage_5X
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.addV("animal").property("name", "mateo").property("name", "gateo").property("name", "cateo").property("age", 5)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"mateo\").has(\"name\", \"gateo\").has(\"name\", \"cateo\").has(\"age\",5)"
+
+  Scenario: g_withSideEffectXa_markoX_addV_propertyXname_selectXaXX_name
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.withSideEffect("a", "marko").addV().property("name", __.select("a")).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | marko |
+    And the graph should return 2 for count of "g.V().has(\"name\",\"marko\")"
+
+  Scenario: g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.addV("person").property(Cardinality.single, "name", "stephen").property(Cardinality.single, "name", "stephenm", "since", 2010)
+      """
+    When iterated to list
+    Then the result should have a count of 1
+    And the graph should return 0 for count of "g.V().has(\"name\",\"stephen\")"
+    And the graph should return 1 for count of "g.V().has(\"name\",\"stephenm\")"
+    And the graph should return 1 for count of "g.V().has(\"name\",\"stephenm\").properties(\"name\").has(\"since\",2010)"
+
+  Scenario: g_V_addVXanimalX_propertyXname_valuesXnameXX_propertyXname_an_animalX_propertyXvaluesXnameX_labelX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.V().addV("animal").property("name", __.values("name")).property("name", "an animal").property(__.values("name"), __.label())
+      """
+    When iterated to list
+    Then the result should have a count of 6
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"marko\").has(\"name\",\"an animal\").has(\"marko\",\"person\")"
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"vadas\").has(\"name\",\"an animal\").has(\"vadas\",\"person\")"
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"lop\").has(\"name\",\"an animal\").has(\"lop\",\"software\")"
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"josh\").has(\"name\",\"an animal\").has(\"josh\",\"person\")"
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"ripple\").has(\"name\",\"an animal\").has(\"ripple\",\"software\")"
+    And the graph should return 1 for count of "g.V().hasLabel(\"animal\").has(\"name\",\"peter\").has(\"name\",\"an animal\").has(\"peter\",\"person\")"
+
+  Scenario: g_withSideEffectXa_testX_V_hasLabelXsoftwareX_propertyXtemp_selectXaXX_valueMapXname_tempX
+    Given the empty graph
+    And the graph initializer of
+      """
+      g.addV("person").property(T.id, 1).property("name", "marko").property("age", 29).as("marko").
+        addV("person").property(T.id, 2).property("name", "vadas").property("age", 27).as("vadas").
+        addV("software").property(T.id, 3).property("name", "lop").property("lang", "java").as("lop").
+        addV("person").property(T.id, 4).property("name","josh").property("age", 32).as("josh").
+        addV("software").property(T.id, 5).property("name", "ripple").property("lang", "java").as("ripple").
+        addV("person").property(T.id, 6).property("name", "peter").property("age", 35).as('peter').
+        addE("knows").from("marko").to("vadas").property(T.id, 7).property("weight", 0.5).
+        addE("knows").from("marko").to("josh").property(T.id, 8).property("weight", 1.0).
+        addE("created").from("marko").to("lop").property(T.id, 9).property("weight", 0.4).
+        addE("created").from("josh").to("ripple").property(T.id, 10).property("weight", 1.0).
+        addE("created").from("josh").to("lop").property(T.id, 11).property("weight", 0.4).
+        addE("created").from("peter").to("lop").property(T.id, 12).property("weight", 0.2)
+      """
+    And the traversal of
+      """
+      g.withSideEffect("a", "test").V().hasLabel("software").property("temp", __.select("a")).valueMap("name", "temp")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | m[{"temp": ["test"], "name": ["lop"]}] |
+      | m[{"temp": ["test"], "name": ["ripple"]}] |

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7a445844/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
index f43c612..d44b439 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/map/AddVertexTest.java
@@ -56,8 +56,6 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
 
     public abstract Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXname_stephenX();
 
-    public abstract Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX();
-
     public abstract Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX();
 
     public abstract Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenm_since_2010X();
@@ -83,7 +81,7 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
     @LoadGraphWith(MODERN)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
-    public void g_V_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX() {
+    public void g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX() {
         final Traversal<Vertex, Vertex> traversal = get_g_VX1X_addVXanimalX_propertyXage_selectXaX_byXageXX_propertyXname_puppyX(convertToVertexId(graph, "marko"));
         printTraversalForm(traversal);
         final Vertex vertex = traversal.next();
@@ -133,22 +131,6 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
     @LoadGraphWith(MODERN)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_MULTI_PROPERTIES)
-    public void g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX() {
-        final Traversal<Vertex, Vertex> traversal = get_g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX();
-        printTraversalForm(traversal);
-        final Vertex stephen = traversal.next();
-        assertFalse(traversal.hasNext());
-        assertEquals("person", stephen.label());
-        assertThat((List<String>) IteratorUtils.asList(stephen.values("name")), containsInAnyOrder("stephen", "stephenm"));
-        assertEquals(2, IteratorUtils.count(stephen.properties()));
-        assertEquals(7, IteratorUtils.count(g.V()));
-    }
-
-    @Test
-    @LoadGraphWith(MODERN)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
-    @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
     public void g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX() {
         final Traversal<Vertex, Vertex> traversal = get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX();
         printTraversalForm(traversal);
@@ -184,7 +166,7 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_VERTICES)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_ADD_PROPERTY)
     @FeatureRequirement(featureClass = Graph.Features.VertexFeatures.class, feature = Graph.Features.VertexFeatures.FEATURE_META_PROPERTIES)
-    public void g_V_hasXname_markoX_addVXmetaPersonX_propertyXname_nameX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX() {
+    public void g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX() {
         final Traversal<Vertex, Vertex> traversal = get_g_V_hasXname_markoX_propertyXfriendWeight_outEXknowsX_weight_sum__acl_privateX();
         printTraversalForm(traversal);
         final Vertex marko = traversal.next();
@@ -333,11 +315,6 @@ public abstract class AddVertexTest extends AbstractGremlinTest {
         }
 
         @Override
-        public Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXname_stephenX_propertyXname_stephenmX() {
-            return g.addV("person").property("name", "stephen").property("name", "stephenm");
-        }
-
-        @Override
         public Traversal<Vertex, Vertex> get_g_addVXpersonX_propertyXsingle_name_stephenX_propertyXsingle_name_stephenmX() {
             return g.addV("person").property(VertexProperty.Cardinality.single, "name", "stephen").property(VertexProperty.Cardinality.single, "name", "stephenm");
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7a445844/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
index 36b2b29..ff6156a 100644
--- a/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
+++ b/gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java
@@ -100,6 +100,12 @@ public class FeatureCoverageTest {
 
     private static Pattern scenarioName = Pattern.compile("^\\s*Scenario:\\s*(.*)$");
 
+    // g_V_addVXlabel_animal_age_0X - deprecated
+    // g_addVXlabel_person_name_stephenX - deprecated
+    private static final List<String> testToIgnore = Arrays.asList(
+            "g_V_addVXlabel_animal_age_0X",
+            "g_addVXlabel_person_name_stephenX");
+
     @Test
     // @Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later")
     public void shouldImplementAllProcessTestsAsFeatures() throws Exception {
@@ -182,6 +188,7 @@ public class FeatureCoverageTest {
                                            t.getSimpleName().replace("Test", "") + ".feature";
             final Set<String> testMethods = Stream.of(t.getDeclaredMethods())
                     .filter(m -> m.isAnnotationPresent(Test.class))
+                    .filter(m -> !testToIgnore.contains(m.getName()))
                     .map(Method::getName).collect(Collectors.toSet());
 
             final File featureFile = new File(featureFileName);