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

traversal is not always closed in Tinkerpop test suites

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • 3.4.10
    • None
    • test-suite
    • None

    Description

      Tinkerpop offers test suites so that GraphProviders can utilize and test their own Graph database implementation.

      http://tinkerpop.apache.org/docs/3.4.10-SNAPSHOT/dev/provider/#validating-with-gremlin-test

      The concept is that a graph provider can pass GraphProvider and Graph class to inject their own implementation. GraphProvider needs to implement clear method to clean up resources after each test case is complete.

      However, depending on the design GraphProvider's implementation requires GraphTraversal to be closed after a query is complete. Right now there is no way for Graph instance to clean up running traversals.

      This leads to the issue that in unit test case some resource won't be released.
      One example can be seen here:

      https://github.com/apache/tinkerpop/blob/0d266da3e5c274afa9306367263e5c9098bedd93/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoCustomTest.java#L151

      In the code above, we run one traversal to get a Vertex but the traversal `g1.traversal()` is not closed.

      Ideally Tinkerpop should take this use-case into account and clean up traversals in test-suites (or at least provide a way to do that for providers without touching the test-suite code base).

      Attachments

        Activity

          People

            Unassigned Unassigned
            redtree1112 Norio Akagi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: