Stephen Mallette created TINKERPOP-2622:
-------------------------------------------

             Summary: Enforce ordering semantics in feature tests
                 Key: TINKERPOP-2622
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2622
             Project: TinkerPop
          Issue Type: Improvement
          Components: test-suite
    Affects Versions: 3.6.0
            Reporter: Stephen Mallette


The semantics for ordering aren't always clear and aren't particularly enforced 
especially when it comes to side-effects. We tend to take the position that 
Gremlin processes results as they arrive and it is that order that is 
maintained, but the test suite can be at odds with that as many tests are 
written without a specific processing order in mind and some implementations 
may not internally process traversers in the same order. For example consider 
{{g_V_group_byXageX}} which currently fails for Spark as {{V()}} returns in a 
different order there than how the assertion is written:

{code}
gremlin> g.V().group().by("age")
==>[null:[v[3],v[5]],32:[v[4]],35:[v[6]],27:[v[2]],29:[v[1]]]
gremlin> g.V().order().by('name').group().by("age")
==>[32:[v[4]],null:[v[3],v[5]],35:[v[6]],27:[v[2]],29:[v[1]]]
{code}

We could try to enforce order as shown above but a more flexible assertion 
system for gherkin seems like a better choice for these cases. As of right now, 
tests that fail in this fashion are ignored.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to