This is an automated email from the ASF dual-hosted git repository.

colegreer pushed a commit to branch repeatLimit
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit bc0c835bd2e55a67284d4495825662d2e9f55aab
Author: Andrea Child <[email protected]>
AuthorDate: Tue Sep 2 16:25:10 2025 -0700

    Added feature tests.
---
 .../traversal/step/filter/RangeGlobalStep.java     |   2 +-
 .../gremlin/test/features/filter/Range.feature     | 162 +++++++++++++++++++++
 2 files changed, 163 insertions(+), 1 deletion(-)

diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
index 2585f73543..b1c61905ea 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/filter/RangeGlobalStep.java
@@ -89,7 +89,7 @@ public final class RangeGlobalStep<S> extends FilterStep<S> 
implements Ranging,
 
             // Create counter key that isolates between different repeat step 
contexts
             String iterationKey = sb.toString();
-            Object vId = ((Vertex) traverser.get()).property("id").value();
+//            Object vId = ((Vertex) traverser.get()).property("id").value();
             currentCounter = 
perIterationCounters.computeIfAbsent(iterationKey, k -> new AtomicLong(0L));
             // System.out.printf("IterationKey: %s Traverser: %s Path: %s 
Counter: %s High: %s%n", iterationKey, vId, traverser.path(), 
currentCounter.get(), this.high);
         }
diff --git 
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/filter/Range.feature
 
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/filter/Range.feature
index 0bbc215bc0..14407afab8 100644
--- 
a/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/filter/Range.feature
+++ 
b/gremlin-test/src/main/resources/org/apache/tinkerpop/gremlin/test/features/filter/Range.feature
@@ -411,3 +411,165 @@ Feature: Step - range()
       | result |
       | l[d[2].i] |
       | l[d[5].i] |
+
+  Scenario: 
g_V_hasXnameX_repeatXlimitX1X_outXfollowedByXX_timesX2X_hasXnameX_filterXvaluesXnameX_mapXlengthXX_isXltX7XXX_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").repeat(__.limit(1).out("followedBy")).times(2).has("name", 
neq("")).filter(__.values("name").map(__.length()).is(lt(7))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | GLORIA |
+      | DRUMS |
+
+  Scenario: 
g_V_hasXnameX_limitX1X_outXfollowedByX_limitX1X_outXfollowedByX_hasXnameX_filterXvaluesXnameX_mapXlengthXX_isXltX7XXX_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").limit(1).out("followedBy").limit(1).out("followedBy").has("name", 
neq("")).filter(__.values("name").map(__.length()).is(lt(7))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | GLORIA |
+      | DRUMS |
+
+  Scenario: 
g_V_hasXnameX_repeatXlimitX2X_outXfollowedByXX_timesX2X_hasXnameX_filterXvaluesXnameX_mapXlengthXX_isXltX5XXX_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").repeat(__.limit(2).out("followedBy")).times(2).has("name", 
neq("")).filter(__.values("name").map(__.length()).is(lt(5))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | RAIN |
+      | DEAL |
+
+  Scenario: 
g_V_hasXnameX_limitX2X_outXfollowedByX_limitX2X_outXfollowedByX_hasXnameX_filterXvaluesXnameX_mapXlengthXX_isXltX5XXX_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").limit(2).out("followedBy").limit(2).out("followedBy").has("name", 
neq("")).filter(__.values("name").map(__.length()).is(lt(5))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | RAIN |
+      | DEAL |
+
+  Scenario: 
g_V_hasXnameX_repeatXoutXfollowedByX_limitX1XX_timesX2X_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").repeat(__.out("followedBy").limit(1)).times(2).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | PLAYING IN THE BAND |
+
+  Scenario: 
g_V_hasXnameX_outXfollowedByX_limitX1X_outXfollowedByX_limitX1X_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").out("followedBy").limit(1).out("followedBy").limit(1).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | PLAYING IN THE BAND |
+
+  Scenario: 
g_V_hasXnameX_repeatXoutXfollowedByX_limitX2XX_timesX2X_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").repeat(__.out("followedBy").limit(2)).times(2).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | SUGAR MAGNOLIA |
+      | PLAYING IN THE BAND |
+
+  Scenario: 
g_V_hasXnameX_outXfollowedByX_limitX2X_outXfollowedByX_limitX2X_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").out("followedBy").limit(2).out("followedBy").limit(2).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | SUGAR MAGNOLIA |
+      | PLAYING IN THE BAND |
+
+  Scenario: 
g_V_hasXnameX_repeatXlimitX1X_outXfollowedByXX_timesX2X_repeatXlimitX1X_inXfollowedByXX_timesX1X_hasXnameX_filterXvaluesXnameX_mapXlengthXX_isXltX5XXX_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").repeat(__.limit(1).out("followedBy")).times(2).repeat(__.limit(1).in("followedBy")).times(1).has("name",
 neq("")).filter(__.values("name").map(__.length()).is(lt(5))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | DEAL |
+
+  Scenario: 
g_V_hasXnameX_limitX1X_outXfollowedByX_limitX1X_outXfollowedByX_limitX1X_inXfollowedByX_hasXnameX_filterXvaluesXnameX_mapXlengthXX_isXltX5XXX_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").limit(1).out("followedBy").limit(1).out("followedBy").limit(1).in("followedBy").has("name",
 neq("")).filter(__.values("name").map(__.length()).is(lt(5))).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | DEAL |
+
+  Scenario: 
g_V_hasXnameX_repeatXlimitX1X_outXfollowedByX_filterXvaluesXnameX_mapXlengthXX_isXltX5XXX_aggregateXxX_byXnameXX_timesX2X_capXxX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").repeat(__.limit(1).out("followedBy").filter(__.values("name").map(__.length()).is(lt(5))).aggregate("x").by("name")).times(2).cap("x")
+      """
+    When iterated next
+    Then the result should be unordered
+      | result |
+      | DEAL |
+      | RAIN |
+
+  Scenario: 
g_V_hasXnameX_limitX1X_outXfollowedByX_filterXvaluesXnameX_mapXlengthXX_isXltX5XXX_aggregateXxX_byXnameX_limitX1X_outXfollowedByX_filterXvaluesXnameX_mapXlengthXX_isXltX5XXX_aggregateXxX_byXnameX_capXxX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").limit(1).out("followedBy").filter(__.values("name").map(__.length()).is(lt(5))).aggregate("x").by("name").limit(1).out("followedBy").filter(__.values("name").map(__.length()).is(lt(5))).aggregate("x").by("name").cap("x")
+      """
+    When iterated next
+    Then the result should be unordered
+      | result |
+      | DEAL |
+      | RAIN |
+
+  Scenario: 
g_V_hasXnameX_unionXoutXfollowedByX_limitX1X_outXfollowedByX_outXfollowedByX_limitX1XX_repeatXlimitX1XX_timesX1X_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").union(__.out("followedBy").limit(1), 
__.out("followedBy").out("followedBy").limit(1)).repeat(__.limit(1)).times(1).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | MORNING DEW |
+
+  Scenario: 
g_V_hasXnameX_unionXoutXfollowedByX_limitX1X_outXfollowedByX_outXfollowedByX_limitX1XX_limitX1X_valuesXnameX
+    Given the grateful graph
+    And the traversal of
+      """
+      g.withoutStrategies(RepeatUnrollStrategy).V().has("name", "DARK 
STAR").union(__.out("followedBy").limit(1), 
__.out("followedBy").out("followedBy").limit(1)).limit(1).values("name")
+      """
+    When iterated to list
+    Then the result should be unordered
+      | result |
+      | MORNING DEW |

Reply via email to