Benjamin Anderson created TINKERPOP-1418:
--------------------------------------------

             Summary: CoreTraversalTests depend on missing functionality
                 Key: TINKERPOP-1418
                 URL: https://issues.apache.org/jira/browse/TINKERPOP-1418
             Project: TinkerPop
          Issue Type: Bug
          Components: structure, test-suite
    Affects Versions: 3.2.1
            Reporter: Benjamin Anderson
            Priority: Minor


The {{shouldLoadVerticesViaVertices}} and {{shouldLoadEdgesViaEdges}} tests in 
[CoreTraversalTests.java|https://github.com/apache/tinkerpop/blob/master/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/CoreTraversalTest.java#L94-L110]
 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|https://github.com/apache/tinkerpop/blob/d696b38ab774dd46c6723d5c59aa7329f96b41e1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/Graph.java#L219])
 - as an implementor it reads as if it's intended to be called only with 
identifiers.

[When these two tests were 
added|https://github.com/apache/tinkerpop/commit/da30a525ef626b8f13ffba0b7abada89b68eff6b]
 some functionality was included in GraphStep to handle mapping Vertex objects 
to their IDs; this functionality was [soon 
removed|https://github.com/apache/tinkerpop/commit/59028c8ad18f23609e31220a59717a2bc05b78af],
 however, and added to TinkerGraph. Incidentally, Titan [also implements the 
same 
functionality|https://github.com/thinkaurelius/titan/blob/titan10/titan-core/src/main/java/com/thinkaurelius/titan/graphdb/tinkerpop/TitanBlueprintsTransaction.java#L113-L141].

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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to