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 727cdfa041 Change Concat.feature to order by name (#3270)
727cdfa041 is described below

commit 727cdfa041901a645a3f2b5f97d243ed267da295
Author: andreachild <[email protected]>
AuthorDate: Tue Nov 4 12:43:18 2025 -0800

    Change Concat.feature to order by name (#3270)
    
    Change Concat.feature to order by name instead of id for providers that may 
not have ids with predictable order.
---
 CHANGELOG.asciidoc                                                | 1 +
 .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs           | 2 +-
 gremlin-go/driver/cucumber/gremlin.go                             | 2 +-
 .../main/javascript/gremlin-javascript/test/cucumber/gremlin.js   | 2 +-
 gremlin-python/src/main/python/radish/gremlin.py                  | 2 +-
 .../org/apache/tinkerpop/gremlin/test/features/map/Concat.feature | 8 ++++----
 6 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 6e0e623939..9766631689 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -128,6 +128,7 @@ This release also includes changes from <<release-3-7-XXX, 
3.7.XXX>>.
 * Renamed `MergeElementStep` to `MergeElementStep` as it is a base class to 
`mergeV()` and `mergeE()`.
 * Renamed `MergeStep` of `merge()` to `MergeElementStep` for consistency.
 * Fixed referenced log file name for `gremlin-archetype-server`.
+* Changed some feature tests using `order()` to use specific `by()` modulators 
for better result predictability.
 * Upgraded Go to version 1.25.
 * Modified `RepeatUnrollStrategy` to use a more conservative approach, only 
unrolling repeat loops containing safe navigation and filtering steps.
 * Modified `limit()`, `skip()`, range()` in `repeat()` to track per-iteration 
counters.
diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs 
b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
index b056ce5bbb..be7233eb54 100644
--- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
+++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs
@@ -1036,7 +1036,7 @@ namespace Gremlin.Net.IntegrationTest.Gherkin
                {"g_injectXListXa_bXcX_concat_XdX", new 
List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> 
{(g,p) =>g.Inject<object>(new List<object> { "a", "b" }, "c").Concat("d")}}, 
                {"g_injectXnullX_concat_XinjectX", new 
List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> 
{(g,p) =>g.Inject<object>(null).Concat()}}, 
                {"g_injectXnull_aX_concat_Xnull_bX", new 
List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> 
{(g,p) =>g.Inject<object>(null, "a").Concat(null, "b")}}, 
-               {"g_injectXhello_hiX_concat_XV_valuesXnameXX", new 
List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> 
{(g,p) =>g.Inject<object>("hello", 
"hi").Concat(__.V().Order().By(T.Id).Values<object>("name"))}}, 
+               
{"g_injectXhello_hiX_concatXV_values_order_byXnameX_valuesXnameXX", new 
List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> 
{(g,p) =>g.Inject<object>("hello", 
"hi").Concat(__.V().Order().By("name").Values<object>("name"))}}, 
                {"g_V_hasLabel_value_concat_X_X_concat_XpersonX", new 
List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> 
{(g,p) =>g.V().HasLabel("person").Values<object>("name").Concat(" 
").Concat("person")}}, 
                
{"g_hasLabelXpersonX_valuesXnameX_asXaX_constantXMrX_concatXselectXaX", new 
List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> 
{(g,p) 
=>g.V().HasLabel("person").Values<object>("name").As("a").Constant<object>("Mr.").Concat(__.Select<object>("a"))}},
 
                
{"g_hasLabelXsoftwareX_asXaX_valuesXnameX_concatXunsesX_concatXselectXaXvaluesXlangX",
 new List<Func<GraphTraversalSource, IDictionary<string, object>, ITraversal>> 
{(g,p) =>g.V().HasLabel("software").As("a").Values<object>("name").Concat(" 
uses ").Concat(__.Select<object>("a").Values<object>("lang"))}}, 
diff --git a/gremlin-go/driver/cucumber/gremlin.go 
b/gremlin-go/driver/cucumber/gremlin.go
index a19fda56f6..84c97cad85 100644
--- a/gremlin-go/driver/cucumber/gremlin.go
+++ b/gremlin-go/driver/cucumber/gremlin.go
@@ -1006,7 +1006,7 @@ var translationMap = map[string][]func(g 
*gremlingo.GraphTraversalSource, p map[
     "g_injectXListXa_bXcX_concat_XdX": {func(g 
*gremlingo.GraphTraversalSource, p map[string]interface{}) 
*gremlingo.GraphTraversal {return g.Inject([]interface{}{"a", "b"}, 
"c").Concat("d")}}, 
     "g_injectXnullX_concat_XinjectX": {func(g *gremlingo.GraphTraversalSource, 
p map[string]interface{}) *gremlingo.GraphTraversal {return 
g.Inject(nil).Concat()}}, 
     "g_injectXnull_aX_concat_Xnull_bX": {func(g 
*gremlingo.GraphTraversalSource, p map[string]interface{}) 
*gremlingo.GraphTraversal {return g.Inject(nil, "a").Concat(nil, "b")}}, 
-    "g_injectXhello_hiX_concat_XV_valuesXnameXX": {func(g 
*gremlingo.GraphTraversalSource, p map[string]interface{}) 
*gremlingo.GraphTraversal {return g.Inject("hello", 
"hi").Concat(gremlingo.T__.V().Order().By(gremlingo.T.Id).Values("name"))}}, 
+    "g_injectXhello_hiX_concatXV_values_order_byXnameX_valuesXnameXX": {func(g 
*gremlingo.GraphTraversalSource, p map[string]interface{}) 
*gremlingo.GraphTraversal {return g.Inject("hello", 
"hi").Concat(gremlingo.T__.V().Order().By("name").Values("name"))}}, 
     "g_V_hasLabel_value_concat_X_X_concat_XpersonX": {func(g 
*gremlingo.GraphTraversalSource, p map[string]interface{}) 
*gremlingo.GraphTraversal {return 
g.V().HasLabel("person").Values("name").Concat(" ").Concat("person")}}, 
     "g_hasLabelXpersonX_valuesXnameX_asXaX_constantXMrX_concatXselectXaX": 
{func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) 
*gremlingo.GraphTraversal {return 
g.V().HasLabel("person").Values("name").As("a").Constant("Mr.").Concat(gremlingo.T__.Select("a"))}},
 
     
"g_hasLabelXsoftwareX_asXaX_valuesXnameX_concatXunsesX_concatXselectXaXvaluesXlangX":
 {func(g *gremlingo.GraphTraversalSource, p map[string]interface{}) 
*gremlingo.GraphTraversal {return 
g.V().HasLabel("software").As("a").Values("name").Concat(" uses 
").Concat(gremlingo.T__.Select("a").Values("lang"))}}, 
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 811e38e2d4..f75d6bcee3 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
@@ -1037,7 +1037,7 @@ const gremlins = {
     g_injectXListXa_bXcX_concat_XdX: [function({g}) { return g.inject(["a", 
"b"], "c").concat("d") }], 
     g_injectXnullX_concat_XinjectX: [function({g}) { return 
g.inject(null).concat() }], 
     g_injectXnull_aX_concat_Xnull_bX: [function({g}) { return g.inject(null, 
"a").concat(null, "b") }], 
-    g_injectXhello_hiX_concat_XV_valuesXnameXX: [function({g}) { return 
g.inject("hello", "hi").concat(__.V().order().by(T.id).values("name")) }], 
+    g_injectXhello_hiX_concatXV_values_order_byXnameX_valuesXnameXX: 
[function({g}) { return g.inject("hello", 
"hi").concat(__.V().order().by("name").values("name")) }], 
     g_V_hasLabel_value_concat_X_X_concat_XpersonX: [function({g}) { return 
g.V().hasLabel("person").values("name").concat(" ").concat("person") }], 
     g_hasLabelXpersonX_valuesXnameX_asXaX_constantXMrX_concatXselectXaX: 
[function({g}) { return 
g.V().hasLabel("person").values("name").as("a").constant("Mr.").concat(__.select("a"))
 }], 
     
g_hasLabelXsoftwareX_asXaX_valuesXnameX_concatXunsesX_concatXselectXaXvaluesXlangX:
 [function({g}) { return 
g.V().hasLabel("software").as("a").values("name").concat(" uses 
").concat(__.select("a").values("lang")) }], 
diff --git a/gremlin-python/src/main/python/radish/gremlin.py 
b/gremlin-python/src/main/python/radish/gremlin.py
index 961230d521..a1eddde85f 100644
--- a/gremlin-python/src/main/python/radish/gremlin.py
+++ b/gremlin-python/src/main/python/radish/gremlin.py
@@ -1009,7 +1009,7 @@ world.gremlins = {
     'g_injectXListXa_bXcX_concat_XdX': [(lambda g:g.inject(['a', 'b'], 
'c').concat('d'))], 
     'g_injectXnullX_concat_XinjectX': [(lambda g:g.inject(None).concat())], 
     'g_injectXnull_aX_concat_Xnull_bX': [(lambda g:g.inject(None, 
'a').concat(None, 'b'))], 
-    'g_injectXhello_hiX_concat_XV_valuesXnameXX': [(lambda g:g.inject('hello', 
'hi').concat(__.V().order().by(T.id_).values('name')))], 
+    'g_injectXhello_hiX_concatXV_values_order_byXnameX_valuesXnameXX': 
[(lambda g:g.inject('hello', 
'hi').concat(__.V().order().by('name').values('name')))], 
     'g_V_hasLabel_value_concat_X_X_concat_XpersonX': [(lambda 
g:g.V().has_label('person').values('name').concat(' ').concat('person'))], 
     'g_hasLabelXpersonX_valuesXnameX_asXaX_constantXMrX_concatXselectXaX': 
[(lambda 
g:g.V().has_label('person').values('name').as_('a').constant('Mr.').concat(__.select('a')))],
 
     
'g_hasLabelXsoftwareX_asXaX_valuesXnameX_concatXunsesX_concatXselectXaXvaluesXlangX':
 [(lambda g:g.V().has_label('software').as_('a').values('name').concat(' uses 
').concat(__.select('a').values('lang')))], 
diff --git 
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Concat.feature
 
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Concat.feature
index 1e97f8c9b3..eb81058b87 100644
--- 
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Concat.feature
+++ 
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/map/Concat.feature
@@ -118,17 +118,17 @@ Feature: Step - concat()
       | ab |
 
   @GraphComputerVerificationInjectionNotSupported
-  Scenario: g_injectXhello_hiX_concat_XV_valuesXnameXX
+  Scenario: g_injectXhello_hiX_concatXV_values_order_byXnameX_valuesXnameXX
     Given the modern graph
     And the traversal of
       """
-      g.inject("hello", "hi").concat(__.V().order().by(id).values("name"))
+      g.inject("hello", "hi").concat(__.V().order().by("name").values("name"))
       """
     When iterated to list
     Then the result should be unordered
       | result |
-      | hellomarko |
-      | himarko |
+      | hellojosh |
+      | hijosh |
 
   Scenario: g_V_hasLabel_value_concat_X_X_concat_XpersonX
     Given the modern graph

Reply via email to