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

CoreTraversalTests depend on missing functionality

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Done
    • 3.2.1
    • 3.1.4, 3.2.2
    • documentation
    • None

    Description

      The shouldLoadVerticesViaVertices and shouldLoadEdgesViaEdges tests in CoreTraversalTests.java appear to depend on unspecified functionality.

      The comment for the .vertices method in the Graph structure class does not specify that it should accept Vertex objects (except in one odd place) - as an implementor it reads as if it's intended to be called only with identifiers.

      When these two tests were added some functionality was included in GraphStep to handle mapping Vertex objects to their IDs; this functionality was soon removed, however, and added to TinkerGraph. Incidentally, Titan also implements the same functionality.

      Is Graph.vertices(Object...) intended to gracefully handle an array of Vertex elements as well as an array of Vertex identifiers? If so, then it appears that the documentation in Graph.java needs some reworking. It'd also perhaps be unfortunate, stylistically, to add a third behavior to that method. If it's not intended to support that call, then it seems that these two methods (and perhaps others?) should be removed from the test suite.

      Attachments

        Activity

          People

            spmallette Stephen Mallette
            banjiewen Benjamin Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: