This is an automated email from the ASF dual-hosted git repository.
andreac pushed a commit to branch 3.8-dev
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
The following commit(s) were added to refs/heads/3.8-dev by this push:
new 56ef1f07e6 Add by modulator to order of RepeatUnrollStrategy feature
tests. (#3265)
56ef1f07e6 is described below
commit 56ef1f07e60ca54d867dcc3a925ba06aec63f235
Author: andreachild <[email protected]>
AuthorDate: Mon Nov 3 10:49:33 2025 -0800
Add by modulator to order of RepeatUnrollStrategy feature tests. (#3265)
---
.../Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 4 +-
gremlin-go/driver/cucumber/gremlin.go | 4 +-
.../gremlin-javascript/test/cucumber/gremlin.js | 4 +-
gremlin-python/src/main/python/radish/gremlin.py | 4 +-
.../integrated/RepeatUnrollStrategy.feature | 48 +++++++++++-----------
5 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
index 84bc0d5250..b056ce5bbb 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
@@ -793,8 +793,8 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
{"g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXbothE_otherV_hasXage_ltX30XXX_timesX2X",
new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>>
{(g,p)
=>g.WithoutStrategies(typeof(RepeatUnrollStrategy)).V().Repeat(__.BothE().OtherV().Has("age",
P.Lt(30))).Times(2)}},
{"g_withStrategiesXRepeatUnrollStrategyX_V_repeatXboth_limitX1XX_timesX2X", new
List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>>
{(g,p) =>g.WithStrategies(new
RepeatUnrollStrategy()).V().Repeat(__.Both().Limit<object>(1)).Times(2)}},
{"g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXboth_limitX1XX_timesX2X",
new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>>
{(g,p)
=>g.WithoutStrategies(typeof(RepeatUnrollStrategy)).V().Repeat(__.Both().Limit<object>(1)).Times(2)}},
-
{"g_withStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_aggregateXxXX_timesX2X_limitX10X",
new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>>
{(g,p) =>g.WithStrategies(new
RepeatUnrollStrategy()).V().Order().By("name").Repeat(__.Both().Order().Aggregate("x")).Times(2).Limit<object>(10)}},
-
{"g_withoutStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_aggregateXxXX_timesX2X_limitX10X",
new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>>
{(g,p)
=>g.WithoutStrategies(typeof(RepeatUnrollStrategy)).V().Order().By("name").Repeat(__.Both().Order().Aggregate("x")).Times(2).Limit<object>(10)}},
+
{"g_withStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_order_byXnameX_aggregateXxXX_timesX2X_limitX10X",
new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>>
{(g,p) =>g.WithStrategies(new
RepeatUnrollStrategy()).V().Order().By("name").Repeat(__.Both().Order().By("name").Aggregate("x")).Times(2).Limit<object>(10)}},
+
{"g_withoutStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_order_byXnameX_aggregateXxXX_timesX2X_limitX10X",
new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>>
{(g,p)
=>g.WithoutStrategies(typeof(RepeatUnrollStrategy)).V().Order().By("name").Repeat(__.Both().Order().By("name").Aggregate("x")).Times(2).Limit<object>(10)}},
{"g_withStrategiesXRepeatUnrollStrategyX_V_repeatXboth_sampleX1XX_timesX2X",
new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>>
{(g,p) =>g.WithStrategies(new
RepeatUnrollStrategy()).V().Repeat(__.Both().Sample(1)).Times(2)}},
{"g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXboth_sampleX1XX_timesX2X",
new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>>
{(g,p)
=>g.WithoutStrategies(typeof(RepeatUnrollStrategy)).V().Repeat(__.Both().Sample(1)).Times(2)}},
{"g_withStrategiesXReservedKeysVerificationStrategyXthrowException_trueXX_addVXpersonX_propertyXid_123X_propertyXname_markoX",
new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>>
{(g,p) =>g.WithStrategies(new ReservedKeysVerificationStrategy(throwException:
true)).AddV("person").Property("id", 123).Property("name", "marko")}},
diff --git a/gremlin-go/driver/cucumber/gremlin.go
b/gremlin-go/driver/cucumber/gremlin.go
index d28e76f6b5..a19fda56f6 100644
--- a/gremlin-go/driver/cucumber/gremlin.go
+++ b/gremlin-go/driver/cucumber/gremlin.go
@@ -763,8 +763,8 @@ var translationMap = map[string][]func(g
*gremlingo.GraphTraversalSource, p map[
"g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXbothE_otherV_hasXage_ltX30XXX_timesX2X":
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{})
*gremlingo.GraphTraversal {return
g.WithoutStrategies(gremlingo.RepeatUnrollStrategy()).V().Repeat(gremlingo.T__.BothE().OtherV().Has("age",
gremlingo.P.Lt(30))).Times(2)}},
"g_withStrategiesXRepeatUnrollStrategyX_V_repeatXboth_limitX1XX_timesX2X":
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{})
*gremlingo.GraphTraversal {return
g.WithStrategies(gremlingo.RepeatUnrollStrategy()).V().Repeat(gremlingo.T__.Both().Limit(1)).Times(2)}},
"g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXboth_limitX1XX_timesX2X":
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{})
*gremlingo.GraphTraversal {return
g.WithoutStrategies(gremlingo.RepeatUnrollStrategy()).V().Repeat(gremlingo.T__.Both().Limit(1)).Times(2)}},
-
"g_withStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_aggregateXxXX_timesX2X_limitX10X":
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{})
*gremlingo.GraphTraversal {return
g.WithStrategies(gremlingo.RepeatUnrollStrategy()).V().Order().By("name").Repeat(gremlingo.T__.Both().Order().Aggregate("x")).Times(2).Limit(10)}},
-
"g_withoutStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_aggregateXxXX_timesX2X_limitX10X":
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{})
*gremlingo.GraphTraversal {return
g.WithoutStrategies(gremlingo.RepeatUnrollStrategy()).V().Order().By("name").Repeat(gremlingo.T__.Both().Order().Aggregate("x")).Times(2).Limit(10)}},
+
"g_withStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_order_byXnameX_aggregateXxXX_timesX2X_limitX10X":
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{})
*gremlingo.GraphTraversal {return
g.WithStrategies(gremlingo.RepeatUnrollStrategy()).V().Order().By("name").Repeat(gremlingo.T__.Both().Order().By("name").Aggregate("x")).Times(2).Limit(10)}},
+
"g_withoutStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_order_byXnameX_aggregateXxXX_timesX2X_limitX10X":
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{})
*gremlingo.GraphTraversal {return
g.WithoutStrategies(gremlingo.RepeatUnrollStrategy()).V().Order().By("name").Repeat(gremlingo.T__.Both().Order().By("name").Aggregate("x")).Times(2).Limit(10)}},
"g_withStrategiesXRepeatUnrollStrategyX_V_repeatXboth_sampleX1XX_timesX2X":
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{})
*gremlingo.GraphTraversal {return
g.WithStrategies(gremlingo.RepeatUnrollStrategy()).V().Repeat(gremlingo.T__.Both().Sample(1)).Times(2)}},
"g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXboth_sampleX1XX_timesX2X":
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{})
*gremlingo.GraphTraversal {return
g.WithoutStrategies(gremlingo.RepeatUnrollStrategy()).V().Repeat(gremlingo.T__.Both().Sample(1)).Times(2)}},
"g_withStrategiesXReservedKeysVerificationStrategyXthrowException_trueXX_addVXpersonX_propertyXid_123X_propertyXname_markoX":
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{})
*gremlingo.GraphTraversal {return
g.WithStrategies(gremlingo.ReservedKeysVerificationStrategy(gremlingo.ReservedKeysVerificationStrategyConfig{ThrowException:
true})).AddV("person").Property("id", 123).Property("name", "marko")}},
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 b6d1d754da..811e38e2d4 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
@@ -794,8 +794,8 @@ const gremlins = {
g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXbothE_otherV_hasXage_ltX30XXX_timesX2X:
[function({g}) { return
g.withoutStrategies(RepeatUnrollStrategy).V().repeat(__.bothE().otherV().has("age",
P.lt(30))).times(2) }],
g_withStrategiesXRepeatUnrollStrategyX_V_repeatXboth_limitX1XX_timesX2X:
[function({g}) { return g.withStrategies(new
RepeatUnrollStrategy()).V().repeat(__.both().limit(1)).times(2) }],
g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXboth_limitX1XX_timesX2X:
[function({g}) { return
g.withoutStrategies(RepeatUnrollStrategy).V().repeat(__.both().limit(1)).times(2)
}],
-
g_withStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_aggregateXxXX_timesX2X_limitX10X:
[function({g}) { return g.withStrategies(new
RepeatUnrollStrategy()).V().order().by("name").repeat(__.both().order().aggregate("x")).times(2).limit(10)
}],
-
g_withoutStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_aggregateXxXX_timesX2X_limitX10X:
[function({g}) { return
g.withoutStrategies(RepeatUnrollStrategy).V().order().by("name").repeat(__.both().order().aggregate("x")).times(2).limit(10)
}],
+
g_withStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_order_byXnameX_aggregateXxXX_timesX2X_limitX10X:
[function({g}) { return g.withStrategies(new
RepeatUnrollStrategy()).V().order().by("name").repeat(__.both().order().by("name").aggregate("x")).times(2).limit(10)
}],
+
g_withoutStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_order_byXnameX_aggregateXxXX_timesX2X_limitX10X:
[function({g}) { return
g.withoutStrategies(RepeatUnrollStrategy).V().order().by("name").repeat(__.both().order().by("name").aggregate("x")).times(2).limit(10)
}],
g_withStrategiesXRepeatUnrollStrategyX_V_repeatXboth_sampleX1XX_timesX2X:
[function({g}) { return g.withStrategies(new
RepeatUnrollStrategy()).V().repeat(__.both().sample(1)).times(2) }],
g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXboth_sampleX1XX_timesX2X:
[function({g}) { return
g.withoutStrategies(RepeatUnrollStrategy).V().repeat(__.both().sample(1)).times(2)
}],
g_withStrategiesXReservedKeysVerificationStrategyXthrowException_trueXX_addVXpersonX_propertyXid_123X_propertyXname_markoX:
[function({g}) { return g.withStrategies(new
ReservedKeysVerificationStrategy({throwException:
true})).addV("person").property("id", 123).property("name", "marko") }],
diff --git a/gremlin-python/src/main/python/radish/gremlin.py
b/gremlin-python/src/main/python/radish/gremlin.py
index 2e06dd0462..961230d521 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -766,8 +766,8 @@ world.gremlins = {
'g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXbothE_otherV_hasXage_ltX30XXX_timesX2X':
[(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy')]).V().repeat(__.both_e().other_v().has('age',
P.lt(30))).times(2))],
'g_withStrategiesXRepeatUnrollStrategyX_V_repeatXboth_limitX1XX_timesX2X':
[(lambda
g:g.with_strategies(RepeatUnrollStrategy()).V().repeat(__.both().limit(1)).times(2))],
'g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXboth_limitX1XX_timesX2X':
[(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy')]).V().repeat(__.both().limit(1)).times(2))],
-
'g_withStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_aggregateXxXX_timesX2X_limitX10X':
[(lambda
g:g.with_strategies(RepeatUnrollStrategy()).V().order().by('name').repeat(__.both().order().aggregate('x')).times(2).limit(10))],
-
'g_withoutStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_aggregateXxXX_timesX2X_limitX10X':
[(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy')]).V().order().by('name').repeat(__.both().order().aggregate('x')).times(2).limit(10))],
+
'g_withStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_order_byXnameX_aggregateXxXX_timesX2X_limitX10X':
[(lambda
g:g.with_strategies(RepeatUnrollStrategy()).V().order().by('name').repeat(__.both().order().by('name').aggregate('x')).times(2).limit(10))],
+
'g_withoutStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_order_byXnameX_aggregateXxXX_timesX2X_limitX10X':
[(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy')]).V().order().by('name').repeat(__.both().order().by('name').aggregate('x')).times(2).limit(10))],
'g_withStrategiesXRepeatUnrollStrategyX_V_repeatXboth_sampleX1XX_timesX2X':
[(lambda
g:g.with_strategies(RepeatUnrollStrategy()).V().repeat(__.both().sample(1)).times(2))],
'g_withoutStrategiesXRepeatUnrollStrategyX_V_repeatXboth_sampleX1XX_timesX2X':
[(lambda
g:g.without_strategies(*[GremlinType('org.apache.tinkerpop.gremlin.process.traversal.strategy.optimization.RepeatUnrollStrategy')]).V().repeat(__.both().sample(1)).times(2))],
'g_withStrategiesXReservedKeysVerificationStrategyXthrowException_trueXX_addVXpersonX_propertyXid_123X_propertyXname_markoX':
[(lambda
g:g.with_strategies(ReservedKeysVerificationStrategy(throw_exception=True)).add_v('person').property('id',
123).property('name', 'marko'))],
diff --git
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/integrated/RepeatUnrollStrategy.feature
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/integrated/RepeatUnrollStrategy.feature
index edae534459..18ca8e9784 100644
---
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/integrated/RepeatUnrollStrategy.feature
+++
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/integrated/RepeatUnrollStrategy.feature
@@ -211,46 +211,46 @@ Feature: Step - RepeatUnrollStrategy
# this traversal is not expected to be unrolled by the strategy but should
have consistent semantics compared to traversal without the strategy applied
@WithRepeatUnrollStrategy
@GraphComputerVerificationStrategyNotSupported
- Scenario:
g_withStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_aggregateXxXX_timesX2X_limitX10X
+ Scenario:
g_withStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_order_byXnameX_aggregateXxXX_timesX2X_limitX10X
Given the modern graph
And the traversal of
"""
-
g.withStrategies(RepeatUnrollStrategy).V().order().by('name').repeat(both().order().aggregate('x')).times(2).limit(10)
+
g.withStrategies(RepeatUnrollStrategy).V().order().by('name').repeat(both().order().by('name').aggregate('x')).times(2).limit(10)
"""
When iterated to list
Then the result should be unordered
| result |
- | v[marko] |
- | v[marko] |
- | v[marko] |
- | v[marko] |
- | v[marko] |
- | v[marko] |
- | v[marko] |
- | v[vadas] |
- | v[vadas] |
- | v[vadas] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
+ | v[lop] |
+ | v[lop] |
+ | v[lop] |
@GraphComputerVerificationStrategyNotSupported
- Scenario:
g_withoutStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_aggregateXxXX_timesX2X_limitX10X
+ Scenario:
g_withoutStrategiesXRepeatUnrollStrategyX_V_order_byXnameX_repeatXboth_order_byXnameX_aggregateXxXX_timesX2X_limitX10X
Given the modern graph
And the traversal of
"""
-
g.withoutStrategies(RepeatUnrollStrategy).V().order().by('name').repeat(both().order().aggregate('x')).times(2).limit(10)
+
g.withoutStrategies(RepeatUnrollStrategy).V().order().by('name').repeat(both().order().by('name').aggregate('x')).times(2).limit(10)
"""
When iterated to list
Then the result should be unordered
| result |
- | v[marko] |
- | v[marko] |
- | v[marko] |
- | v[marko] |
- | v[marko] |
- | v[marko] |
- | v[marko] |
- | v[vadas] |
- | v[vadas] |
- | v[vadas] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
+ | v[josh] |
+ | v[lop] |
+ | v[lop] |
+ | v[lop] |
# this traversal is not expected to be unrolled by the strategy but should
have consistent semantics compared to traversal without the strategy applied
@WithRepeatUnrollStrategy