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 2018/05/30 17:27:11 UTC

[1/2] tinkerpop git commit: Added GraphSON 3.0 tests for translator CTR

Repository: tinkerpop
Updated Branches:
  refs/heads/master 78d1a62b2 -> 94d0c3cec


Added GraphSON 3.0 tests for translator CTR


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

Branch: refs/heads/master
Commit: d25807149c82d4b908a4486f709d050bc030d2d8
Parents: 0496922
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed May 30 13:26:24 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed May 30 13:26:24 2018 -0400

----------------------------------------------------------------------
 ...ctTinkerGraphGraphSONTranslatorProvider.java | 115 +++++++++++++++++++
 .../io/graphson/GraphSONTranslator.java         |  26 ++++-
 ...GraphGraphSONTranslatorComputerProvider.java |  37 ------
 ...phGraphSONTranslatorProcessComputerTest.java |  33 ------
 ...phGraphSONTranslatorProcessStandardTest.java |  33 ------
 .../TinkerGraphGraphSONTranslatorProvider.java  |  78 -------------
 ...GraphSONv2TranslatorProcessComputerTest.java |  34 ++++++
 ...GraphSONv2TranslatorProcessStandardTest.java |  34 ++++++
 ...GraphSONv3TranslatorProcessComputerTest.java |  34 ++++++
 ...GraphSONv3TranslatorProcessStandardTest.java |  34 ++++++
 10 files changed, 272 insertions(+), 186 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/AbstractTinkerGraphGraphSONTranslatorProvider.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/AbstractTinkerGraphGraphSONTranslatorProvider.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/AbstractTinkerGraphGraphSONTranslatorProvider.java
new file mode 100644
index 0000000..c20ed11
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/AbstractTinkerGraphGraphSONTranslatorProvider.java
@@ -0,0 +1,115 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.GraphProvider;
+import org.apache.tinkerpop.gremlin.LoadGraphWith;
+import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
+import org.apache.tinkerpop.gremlin.process.traversal.CoreTraversalTest;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionComputerTest;
+import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionTest;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
+import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest;
+import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProgramTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategyProcessTest;
+import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategy;
+import org.apache.tinkerpop.gremlin.structure.Graph;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONVersion;
+import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
+import org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerGraphComputer;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public abstract class AbstractTinkerGraphGraphSONTranslatorProvider extends TinkerGraphProvider {
+
+    private static Set<String> SKIP_TESTS = new HashSet<>(Arrays.asList(
+            "testProfileStrategyCallback",
+            "testProfileStrategyCallbackSideEffect",
+            //
+            ProgramTest.Traversals.class.getCanonicalName(),
+            TraversalInterruptionTest.class.getCanonicalName(),
+            TraversalInterruptionComputerTest.class.getCanonicalName(),
+            EventStrategyProcessTest.class.getCanonicalName(),
+            ElementIdStrategyProcessTest.class.getCanonicalName()));
+
+    private final GraphSONVersion version;
+
+    AbstractTinkerGraphGraphSONTranslatorProvider(final GraphSONVersion version) {
+        this.version = version;
+    }
+
+    @Override
+    public Map<String, Object> getBaseConfiguration(final String graphName, final Class<?> test, final String testMethodName,
+                                                    final LoadGraphWith.GraphData loadGraphWith) {
+        final Map<String, Object> config = super.getBaseConfiguration(graphName, test, testMethodName, loadGraphWith);
+        config.put("skipTest", SKIP_TESTS.contains(testMethodName) || SKIP_TESTS.contains(test.getCanonicalName()));
+        return config;
+    }
+
+    @Override
+    public GraphTraversalSource traversal(final Graph graph) {
+        if ((Boolean) graph.configuration().getProperty("skipTest"))
+            return graph.traversal();
+        else {
+            final GraphTraversalSource g = graph.traversal();
+            return g.withStrategies(new TranslationStrategy(g, new GraphSONTranslator<>(JavaTranslator.of(g), version)));
+        }
+    }
+
+    public static class TinkerGraphGraphSONv2TranslatorProvider extends AbstractTinkerGraphGraphSONTranslatorProvider {
+        public TinkerGraphGraphSONv2TranslatorProvider() {
+            super(GraphSONVersion.V2_0);
+        }
+    }
+
+    public static class TinkerGraphGraphSONv3TranslatorProvider extends AbstractTinkerGraphGraphSONTranslatorProvider {
+        public TinkerGraphGraphSONv3TranslatorProvider() {
+            super(GraphSONVersion.V3_0);
+        }
+    }
+
+    @GraphProvider.Descriptor(computer = TinkerGraphComputer.class)
+    public static class TinkerGraphGraphSONv2TranslatorComputerProvider extends TinkerGraphGraphSONv2TranslatorProvider {
+
+        @Override
+        public GraphTraversalSource traversal(final Graph graph) {
+            return super.traversal(graph).withComputer();
+        }
+    }
+
+    @GraphProvider.Descriptor(computer = TinkerGraphComputer.class)
+    public static class TinkerGraphGraphSONv3TranslatorComputerProvider extends TinkerGraphGraphSONv3TranslatorProvider {
+
+        @Override
+        public GraphTraversalSource traversal(final Graph graph) {
+            return super.traversal(graph).withComputer();
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/GraphSONTranslator.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/GraphSONTranslator.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/GraphSONTranslator.java
index 612c811..4a8c5f1 100644
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/GraphSONTranslator.java
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/GraphSONTranslator.java
@@ -29,23 +29,40 @@ import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONReader;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONVersion;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter;
 import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONXModuleV2d0;
+import org.apache.tinkerpop.gremlin.structure.io.graphson.GraphSONXModuleV3d0;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 
 /**
  * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
  */
 final class GraphSONTranslator<S extends TraversalSource, T extends Traversal.Admin<?, ?>> implements Translator.StepTranslator<S, T> {
 
     private final JavaTranslator<S, T> wrappedTranslator;
-    private final GraphSONMapper mapper = GraphSONMapper.build()
-            .addCustomModule(GraphSONXModuleV2d0.build().create(false)).version(GraphSONVersion.V2_0).create();
-    private final GraphSONWriter writer = GraphSONWriter.build().mapper(mapper).create();
-    private final GraphSONReader reader = GraphSONReader.build().mapper(mapper).create();
+    private final GraphSONWriter writer;
+    private final GraphSONReader reader;
 
     public GraphSONTranslator(final JavaTranslator<S, T> wrappedTranslator) {
+        this(wrappedTranslator, GraphSONVersion.V2_0);
+    }
+
+    public GraphSONTranslator(final JavaTranslator<S, T> wrappedTranslator, final GraphSONVersion version) {
         this.wrappedTranslator = wrappedTranslator;
+        final GraphSONMapper mapper;
+        if (version == GraphSONVersion.V2_0) {
+            mapper = GraphSONMapper.build()
+                    .addCustomModule(GraphSONXModuleV2d0.build().create(false)).version(GraphSONVersion.V2_0).create();
+        } else if (version == GraphSONVersion.V3_0) {
+            mapper = GraphSONMapper.build()
+                    .addCustomModule(GraphSONXModuleV3d0.build().create(false)).version(GraphSONVersion.V3_0).create();
+        } else {
+            throw new IllegalArgumentException("GraphSONVersion." + version.name() + " is not supported for testing");
+        }
+
+        writer = GraphSONWriter.build().mapper(mapper).create();
+        reader = GraphSONReader.build().mapper(mapper).create();
     }
 
     @Override
@@ -58,7 +75,6 @@ final class GraphSONTranslator<S extends TraversalSource, T extends Traversal.Ad
         try {
             final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
             this.writer.writeObject(outputStream, bytecode);
-            // System.out.println(new String(outputStream.toByteArray()));
             return this.wrappedTranslator.translate(this.reader.readObject(new ByteArrayInputStream(outputStream.toByteArray()), Bytecode.class));
         } catch (final Exception e) {
             throw new IllegalStateException(e.getMessage(), e);

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorComputerProvider.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorComputerProvider.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorComputerProvider.java
deleted file mode 100644
index 2890bfe..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorComputerProvider.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
-
-import org.apache.tinkerpop.gremlin.GraphProvider;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerGraphComputer;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@GraphProvider.Descriptor(computer = TinkerGraphComputer.class)
-public class TinkerGraphGraphSONTranslatorComputerProvider extends TinkerGraphGraphSONTranslatorProvider {
-
-    @Override
-    public GraphTraversalSource traversal(final Graph graph) {
-        return super.traversal(graph).withComputer();
-    }
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessComputerTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessComputerTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessComputerTest.java
deleted file mode 100644
index e715aef..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessComputerTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
-
-import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.process.ProcessComputerSuite;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
-import org.junit.runner.RunWith;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@RunWith(ProcessComputerSuite.class)
-@GraphProviderClass(provider = TinkerGraphGraphSONTranslatorComputerProvider.class, graph = TinkerGraph.class)
-public class TinkerGraphGraphSONTranslatorProcessComputerTest {
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessStandardTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessStandardTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessStandardTest.java
deleted file mode 100644
index 4ccee61..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProcessStandardTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
-
-import org.apache.tinkerpop.gremlin.GraphProviderClass;
-import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
-import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
-import org.junit.runner.RunWith;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-@RunWith(ProcessStandardSuite.class)
-@GraphProviderClass(provider = TinkerGraphGraphSONTranslatorProvider.class, graph = TinkerGraph.class)
-public class TinkerGraphGraphSONTranslatorProcessStandardTest {
-}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProvider.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProvider.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProvider.java
deleted file mode 100644
index 54a0f5e..0000000
--- a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONTranslatorProvider.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License.
- */
-
-package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
-
-import org.apache.tinkerpop.gremlin.LoadGraphWith;
-import org.apache.tinkerpop.gremlin.jsr223.JavaTranslator;
-import org.apache.tinkerpop.gremlin.process.traversal.CoreTraversalTest;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionComputerTest;
-import org.apache.tinkerpop.gremlin.process.traversal.TraversalInterruptionTest;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
-import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.PageRankTest;
-import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProgramTest;
-import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.ElementIdStrategyProcessTest;
-import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.EventStrategyProcessTest;
-import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.PartitionStrategyProcessTest;
-import org.apache.tinkerpop.gremlin.process.traversal.strategy.decoration.TranslationStrategy;
-import org.apache.tinkerpop.gremlin.structure.Graph;
-import org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphProvider;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-/**
- * @author Marko A. Rodriguez (http://markorodriguez.com)
- */
-public class TinkerGraphGraphSONTranslatorProvider extends TinkerGraphProvider {
-
-    private static Set<String> SKIP_TESTS = new HashSet<>(Arrays.asList(
-            "testProfileStrategyCallback",
-            "testProfileStrategyCallbackSideEffect",
-            //
-            ProgramTest.Traversals.class.getCanonicalName(),
-            TraversalInterruptionTest.class.getCanonicalName(),
-            TraversalInterruptionComputerTest.class.getCanonicalName(),
-            EventStrategyProcessTest.class.getCanonicalName(),
-            ElementIdStrategyProcessTest.class.getCanonicalName()));
-
-
-    @Override
-    public Map<String, Object> getBaseConfiguration(final String graphName, final Class<?> test, final String testMethodName,
-                                                    final LoadGraphWith.GraphData loadGraphWith) {
-
-        final Map<String, Object> config = super.getBaseConfiguration(graphName, test, testMethodName, loadGraphWith);
-        config.put("skipTest", SKIP_TESTS.contains(testMethodName) || SKIP_TESTS.contains(test.getCanonicalName()));
-        return config;
-    }
-
-    @Override
-    public GraphTraversalSource traversal(final Graph graph) {
-        if ((Boolean) graph.configuration().getProperty("skipTest"))
-            return graph.traversal();
-            //throw new VerificationException("This test current does not work with Gremlin-Python", EmptyTraversal.instance());
-        else {
-            final GraphTraversalSource g = graph.traversal();
-            return g.withStrategies(new TranslationStrategy(g, new GraphSONTranslator<>(JavaTranslator.of(g))));
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessComputerTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessComputerTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessComputerTest.java
new file mode 100644
index 0000000..7cb4a14
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessComputerTest.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.process.ProcessComputerSuite;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@RunWith(ProcessComputerSuite.class)
+@GraphProviderClass(provider = AbstractTinkerGraphGraphSONTranslatorProvider.TinkerGraphGraphSONv2TranslatorComputerProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphGraphSONv2TranslatorProcessComputerTest {
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessStandardTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessStandardTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessStandardTest.java
new file mode 100644
index 0000000..7c368cb
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv2TranslatorProcessStandardTest.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@RunWith(ProcessStandardSuite.class)
+@GraphProviderClass(provider = AbstractTinkerGraphGraphSONTranslatorProvider.TinkerGraphGraphSONv2TranslatorProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphGraphSONv2TranslatorProcessStandardTest {
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessComputerTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessComputerTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessComputerTest.java
new file mode 100644
index 0000000..d5af274
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessComputerTest.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.process.ProcessComputerSuite;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@RunWith(ProcessComputerSuite.class)
+@GraphProviderClass(provider = AbstractTinkerGraphGraphSONTranslatorProvider.TinkerGraphGraphSONv3TranslatorComputerProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphGraphSONv3TranslatorProcessComputerTest {
+}

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/d2580714/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessStandardTest.java
----------------------------------------------------------------------
diff --git a/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessStandardTest.java b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessStandardTest.java
new file mode 100644
index 0000000..4fba4e3
--- /dev/null
+++ b/tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/structure/io/graphson/TinkerGraphGraphSONv3TranslatorProcessStandardTest.java
@@ -0,0 +1,34 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.tinkerpop.gremlin.tinkergraph.structure.io.graphson;
+
+import org.apache.tinkerpop.gremlin.GraphProviderClass;
+import org.apache.tinkerpop.gremlin.process.ProcessStandardSuite;
+import org.apache.tinkerpop.gremlin.tinkergraph.structure.TinkerGraph;
+import org.junit.runner.RunWith;
+
+/**
+ * @author Marko A. Rodriguez (http://markorodriguez.com)
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+@RunWith(ProcessStandardSuite.class)
+@GraphProviderClass(provider = AbstractTinkerGraphGraphSONTranslatorProvider.TinkerGraphGraphSONv3TranslatorProvider.class, graph = TinkerGraph.class)
+public class TinkerGraphGraphSONv3TranslatorProcessStandardTest {
+}


[2/2] tinkerpop git commit: Merge branch 'tp33'

Posted by sp...@apache.org.
Merge branch 'tp33'


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

Branch: refs/heads/master
Commit: 94d0c3ceca9e99f728bd43a6c4f9cab7a966ade0
Parents: 78d1a62 d258071
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed May 30 13:27:00 2018 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed May 30 13:27:00 2018 -0400

----------------------------------------------------------------------
 ...ctTinkerGraphGraphSONTranslatorProvider.java | 115 +++++++++++++++++++
 .../io/graphson/GraphSONTranslator.java         |  26 ++++-
 ...GraphGraphSONTranslatorComputerProvider.java |  37 ------
 ...phGraphSONTranslatorProcessComputerTest.java |  33 ------
 ...phGraphSONTranslatorProcessStandardTest.java |  33 ------
 .../TinkerGraphGraphSONTranslatorProvider.java  |  78 -------------
 ...GraphSONv2TranslatorProcessComputerTest.java |  34 ++++++
 ...GraphSONv2TranslatorProcessStandardTest.java |  34 ++++++
 ...GraphSONv3TranslatorProcessComputerTest.java |  34 ++++++
 ...GraphSONv3TranslatorProcessStandardTest.java |  34 ++++++
 10 files changed, 272 insertions(+), 186 deletions(-)
----------------------------------------------------------------------