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 2023/03/31 20:17:34 UTC
[tinkerpop] branch master updated: TINKERPOP-2816 Added some order to test of coin() CTR
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/master by this push:
new 49d21043f7 TINKERPOP-2816 Added some order to test of coin() CTR
new d4a92775af Merge branch '3.6-dev'
49d21043f7 is described below
commit 49d21043f7488a691272e094442453486bf2dc2d
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Fri Mar 31 15:59:48 2023 -0400
TINKERPOP-2816 Added some order to test of coin() CTR
---
gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 2 +-
gremlin-go/driver/cucumber/gremlin.go | 2 +-
.../src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js | 2 +-
gremlin-python/src/main/python/radish/gremlin.py | 2 +-
.../org/apache/tinkerpop/gremlin/test/features/filter/Coin.feature | 6 +++---
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
index 23a3414e82..0f54b850b9 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
@@ -130,7 +130,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_V_hasXname_markoX_and_hasXname_markoX_and_hasXname_markoX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Has("name","marko").And().Has("name","marko").And().Has("name","marko")}},
{"g_V_coinX1X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Coin(1.0)}},
{"g_V_coinX0X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V().Coin(0.0)}},
- {"g_withStrategiesXSeedStrategyX_V_coinX50X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new SeedStrategy(seed: 999999)).V().Coin(0.5)}},
+ {"g_withStrategiesXSeedStrategyX_V_order_byXnameX_coinX50X", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.WithStrategies(new SeedStrategy(seed: 999999)).V().Order().By("name").Coin(0.5)}},
{"g_VX1X_outXcreatedX_inXcreatedX_cyclicPath", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Out("created").In("created").CyclicPath()}},
{"g_VX1X_both_both_cyclicPath_byXageX", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Both().Both().CyclicPath().By("age")}},
{"g_VX1X_outXcreatedX_inXcreatedX_cyclicPath_path", new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> {(g,p) =>g.V(p["vid1"]).Out("created").In("created").CyclicPath().Path()}},
diff --git a/gremlin-go/driver/cucumber/gremlin.go b/gremlin-go/driver/cucumber/gremlin.go
index 420abb1246..b5e33ae01c 100644
--- a/gremlin-go/driver/cucumber/gremlin.go
+++ b/gremlin-go/driver/cucumber/gremlin.go
@@ -101,7 +101,7 @@ var translationMap = map[string][]func(g *gremlingo.GraphTraversalSource, p map[
"g_V_hasXname_markoX_and_hasXname_markoX_and_hasXname_markoX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Has("name", "marko").And().Has("name", "marko").And().Has("name", "marko")}},
"g_V_coinX1X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Coin(1.0)}},
"g_V_coinX0X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V().Coin(0.0)}},
- "g_withStrategiesXSeedStrategyX_V_coinX50X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.SeedStrategy(gremlingo.SeedStrategyConfig{Seed: 999999})).V().Coin(0.5)}},
+ "g_withStrategiesXSeedStrategyX_V_order_byXnameX_coinX50X": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.WithStrategies(gremlingo.SeedStrategy(gremlingo.SeedStrategyConfig{Seed: 999999})).V().Order().By("name").Coin(0.5)}},
"g_VX1X_outXcreatedX_inXcreatedX_cyclicPath": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V(p["vid1"]).Out("created").In("created").CyclicPath()}},
"g_VX1X_both_both_cyclicPath_byXageX": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V(p["vid1"]).Both().Both().CyclicPath().By("age")}},
"g_VX1X_outXcreatedX_inXcreatedX_cyclicPath_path": {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) *gremlingo.GraphTraversal {return g.V(p["vid1"]).Out("created").In("created").CyclicPath().Path()}},
diff --git a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
index 6c90c71287..49e39e2d69 100644
--- a/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
+++ b/gremlin-javascript/src/main/javascript/gremlin-javascript/test/cucumber/gremlin.js
@@ -120,7 +120,7 @@ const gremlins = {
g_V_hasXname_markoX_and_hasXname_markoX_and_hasXname_markoX: [function({g}) { return g.V().has("name","marko").and().has("name","marko").and().has("name","marko") }],
g_V_coinX1X: [function({g}) { return g.V().coin(1.0) }],
g_V_coinX0X: [function({g}) { return g.V().coin(0.0) }],
- g_withStrategiesXSeedStrategyX_V_coinX50X: [function({g}) { return g.withStrategies(new SeedStrategy({seed:999999})).V().coin(0.5) }],
+ g_withStrategiesXSeedStrategyX_V_order_byXnameX_coinX50X: [function({g}) { return g.withStrategies(new SeedStrategy({seed:999999})).V().order().by("name").coin(0.5) }],
g_VX1X_outXcreatedX_inXcreatedX_cyclicPath: [function({g, vid1}) { return g.V(vid1).out("created").in_("created").cyclicPath() }],
g_VX1X_both_both_cyclicPath_byXageX: [function({g, vid1}) { return g.V(vid1).both().both().cyclicPath().by("age") }],
g_VX1X_outXcreatedX_inXcreatedX_cyclicPath_path: [function({g, vid1}) { return g.V(vid1).out("created").in_("created").cyclicPath().path() }],
diff --git a/gremlin-python/src/main/python/radish/gremlin.py b/gremlin-python/src/main/python/radish/gremlin.py
index 3869ff14bc..078b9a8f88 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -102,7 +102,7 @@ world.gremlins = {
'g_V_hasXname_markoX_and_hasXname_markoX_and_hasXname_markoX': [(lambda g:g.V().has('name','marko').and_().has('name','marko').and_().has('name','marko'))],
'g_V_coinX1X': [(lambda g:g.V().coin(float(1.0)))],
'g_V_coinX0X': [(lambda g:g.V().coin(float(0.0)))],
- 'g_withStrategiesXSeedStrategyX_V_coinX50X': [(lambda g:g.withStrategies(*[TraversalStrategy('SeedStrategy',{'seed':999999,'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategy'}, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategy')]).V().coin(float(0.5)))],
+ 'g_withStrategiesXSeedStrategyX_V_order_byXnameX_coinX50X': [(lambda g:g.withStrategies(*[TraversalStrategy('SeedStrategy',{'seed':999999,'strategy':'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategy'}, 'org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.SeedStrategy')]).V().order().by('name').coin(float(0.5)))],
'g_VX1X_outXcreatedX_inXcreatedX_cyclicPath': [(lambda g, vid1=None:g.V(vid1).out('created').in_('created').cyclicPath())],
'g_VX1X_both_both_cyclicPath_byXageX': [(lambda g, vid1=None:g.V(vid1).both().both().cyclicPath().by('age'))],
'g_VX1X_outXcreatedX_inXcreatedX_cyclicPath_path': [(lambda g, vid1=None:g.V(vid1).out('created').in_('created').cyclicPath().path())],
diff --git a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/filter/Coin.feature b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/filter/Coin.feature
index 802fa9db50..fd007fb320 100644
--- a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/filter/Coin.feature
+++ b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/filter/Coin.feature
@@ -44,13 +44,13 @@ Feature: Step - coin()
Then the result should be empty
@GraphComputerVerificationStrategyNotSupported @WithSeedStrategy
- Scenario: g_withStrategiesXSeedStrategyX_V_coinX50X
+ Scenario: g_withStrategiesXSeedStrategyX_V_order_byXnameX_coinX50X
Given the modern graph
And the traversal of
"""
- g.withStrategies(new SeedStrategy(seed: 999999)).V().coin(0.5)
+ g.withStrategies(new SeedStrategy(seed: 999999)).V().order().by("name").coin(0.5)
"""
When iterated to list
Then the result should be unordered
| result |
- | v[marko] |
\ No newline at end of file
+ | v[josh] |
\ No newline at end of file