tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [05/27] tinkerpop git commit: TINKERPOP-1857 General test naming fixes and other inconsistencies
Date Tue, 20 Feb 2018 19:06:56 GMT
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 <spmva@genoprime.com>
Authored: Wed Dec 27 13:18:15 2017 -0500
Committer: Stephen Mallette <spmva@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);


Mime
View raw message