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 2021/01/04 21:30:47 UTC

[tinkerpop] branch master updated: Fixed failing test after 17b35aa295f7e84f26fd75f8a82fc7e1c33f73f0

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 64ec9fb  Fixed failing test after 17b35aa295f7e84f26fd75f8a82fc7e1c33f73f0
64ec9fb is described below

commit 64ec9fbc9e6d368f1a251b25cf7b120ace09298c
Author: Stephen Mallette <st...@amazon.com>
AuthorDate: Mon Jan 4 16:29:21 2021 -0500

    Fixed failing test after 17b35aa295f7e84f26fd75f8a82fc7e1c33f73f0
    
    Adjusted the assertions a bit. Not sure the failing bit is really even necessary anymore to verify any particular semantics, but I left it as it was and just adjusted the assertion given the current expectations. CTR
---
 .../strategy/optimization/EarlyLimitStrategyProcessTest.java      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/EarlyLimitStrategyProcessTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/EarlyLimitStrategyProcessTest.java
index 33d18c1..3806f03 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/EarlyLimitStrategyProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/EarlyLimitStrategyProcessTest.java
@@ -95,13 +95,17 @@ public class EarlyLimitStrategyProcessTest extends AbstractGremlinProcessTest {
             assertTrue(metrics.getMetrics(5).getName().endsWith("@[d]"));
             assertEquals("RangeGlobalStep(0,1)", metrics.getMetrics(6).getName());
             assertEquals("PathStep@[e]", metrics.getMetrics(7).getName());
-            assertTrue(metrics.getMetrics(7).getCounts().values().stream().noneMatch(x -> x != 1L));
+            assertTrue(metrics.getMetrics(7).getCounts().values().stream().allMatch(x -> x == 1L));
         } else {
             assertEquals(11, metrics.getMetrics().size());
             assertEquals("RangeGlobalStep(0,5)@[d]", metrics.getMetrics(6).getName());
             assertEquals("PathStep", metrics.getMetrics(7).getName());
             assertEquals("RangeGlobalStep(0,1)@[e]", metrics.getMetrics(8).getName());
-            assertTrue(metrics.getMetrics(7).getCounts().values().stream().allMatch(x -> x != 1L));
+            // the following used to get 2 for the count but after 17b35aa295f7e84f26fd75f8a82fc7e1c33f73f0 we stopped
+            // forward pulling an extra traverser, so pretty sure the correct assertion is to match what happens with
+            // EarlyLimitStrategy above. i'm not even sure there is a point to asserting this anymore as the original
+            // intent does not appear clear to me, but i will leave it for now.
+            assertTrue(metrics.getMetrics(7).getCounts().values().stream().allMatch(x -> x == 1L));
         }
     }
 }
\ No newline at end of file