You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/02/12 16:43:57 UTC

incubator-tinkerpop git commit: Should not use GraphFactory to create graphs in tests.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/tp31 1f0584658 -> e982a0c1b


Should not use GraphFactory to create graphs in tests.

GraphFactory will create Graph instances unmanaged by the test suite.  They won't be able to be shutdown and cleaned up by the GraphManager in that case after a test is complete. Must use GraphProvider.openTestGraph() instead. CTR


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/e982a0c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/e982a0c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/e982a0c1

Branch: refs/heads/tp31
Commit: e982a0c1b018604e13755ccad65e308b77018fc3
Parents: 1f05846
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Feb 12 10:40:32 2016 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Feb 12 10:42:16 2016 -0500

----------------------------------------------------------------------
 .../org/apache/tinkerpop/gremlin/structure/io/IoTest.java     | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e982a0c1/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
index 75b6253..2bf0485 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/structure/io/IoTest.java
@@ -42,7 +42,6 @@ import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONTokens;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.LegacyGraphSONReader;
 import org.apache.tinkerpop.gremlin.structure.io.util.CustomId;
-import org.apache.tinkerpop.gremlin.structure.util.GraphFactory;
 import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils;
 import org.apache.tinkerpop.shaded.jackson.databind.JsonNode;
 import org.apache.tinkerpop.shaded.jackson.databind.ObjectMapper;
@@ -263,7 +262,7 @@ public class IoTest {
             v1.addEdge("SELF-LOOP", v1);
 
             final Configuration targetConf = graphProvider.newGraphConfiguration("target", this.getClass(), name.getMethodName(), null);
-            final Graph target = GraphFactory.open(targetConf);
+            final Graph target = graphProvider.openTestGraph(targetConf);
             try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
                 source.io(IoCore.graphml()).writer().create().writeGraph(os, source);
                 try (ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray())) {
@@ -292,7 +291,7 @@ public class IoTest {
             v1.addEdge("SELF-LOOP", v1);
 
             final Configuration targetConf = graphProvider.newGraphConfiguration("target", this.getClass(), name.getMethodName(), null);
-            final Graph target = GraphFactory.open(targetConf);
+            final Graph target = graphProvider.openTestGraph(targetConf);;
             try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
                 source.io(IoCore.gryo()).writer().create().writeGraph(os, source);
                 try (ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray())) {
@@ -437,7 +436,7 @@ public class IoTest {
             v1.addEdge("SELF-LOOP", v1);
 
             final Configuration targetConf = graphProvider.newGraphConfiguration("target", this.getClass(), name.getMethodName(), null);
-            final Graph target = GraphFactory.open(targetConf);
+            final Graph target = graphProvider.openTestGraph(targetConf);
             try (ByteArrayOutputStream os = new ByteArrayOutputStream()) {
                 source.io(IoCore.graphson()).writer().create().writeGraph(os, source);
                 try (ByteArrayInputStream is = new ByteArrayInputStream(os.toByteArray())) {