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:07:23 UTC

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

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/tp32
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  |