You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by "Norio Akagi (Jira)" <ji...@apache.org> on 2021/03/19 07:40:00 UTC
[jira] [Created] (TINKERPOP-2538) traversal is not always closed in
Tinkerpop test suites
Norio Akagi created TINKERPOP-2538:
--------------------------------------
Summary: traversal is not always closed in Tinkerpop test suites
Key: TINKERPOP-2538
URL: https://issues.apache.org/jira/browse/TINKERPOP-2538
Project: TinkerPop
Issue Type: Improvement
Components: test-suite
Affects Versions: 3.4.10
Reporter: Norio Akagi
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).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)