Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2622

Enforce ordering semantics in feature tests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.6.0
    • 3.7.0, 3.6.2
    • test-suite
    • None

    Description

      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:

      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]]]
      

      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.

      Attachments

        Issue Links

          Activity

            People

              spmallette Stephen Mallette
              spmallette Stephen Mallette
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: