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/03/17 23:44:18 UTC

[45/50] incubator-tinkerpop git commit: Seems like a special case is needed for RemoteGraph in this test.

Seems like a special case is needed for RemoteGraph in this test.

Strategy application must be different or something for RemoteGraph than it is for Spark. That seems to be where the discrepancy is.


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

Branch: refs/heads/TINKERPOP-575
Commit: 0d5873f18cef674a21f8d6f1eea8136678c59292
Parents: fb26142
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Thu Mar 17 15:44:59 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Mar 17 17:01:36 2016 -0400

----------------------------------------------------------------------
 .../strategy/verification/ReadOnlyStrategyProcessTest.java  | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/0d5873f1/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ReadOnlyStrategyProcessTest.java
----------------------------------------------------------------------
diff --git a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ReadOnlyStrategyProcessTest.java b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ReadOnlyStrategyProcessTest.java
index 709d564..d9c266f 100644
--- a/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ReadOnlyStrategyProcessTest.java
+++ b/gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/verification/ReadOnlyStrategyProcessTest.java
@@ -20,6 +20,7 @@ package org.apache.tinkerpop.gremlin.process.traversal.strategy.verification;
 
 import org.apache.tinkerpop.gremlin.FeatureRequirement;
 import org.apache.tinkerpop.gremlin.process.AbstractGremlinProcessTest;
+import org.apache.tinkerpop.gremlin.process.remote.RemoteGraph;
 import org.apache.tinkerpop.gremlin.process.traversal.Traversal;
 import org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource;
 import org.apache.tinkerpop.gremlin.structure.Graph;
@@ -101,7 +102,13 @@ public class ReadOnlyStrategyProcessTest extends AbstractGremlinProcessTest {
 
     private void assertTraversal(final Traversal t, final boolean expectMutatingStep) {
         try {
-            t.hasNext();
+            // not sure why i need a special hook here for RemoteGraph. It only triggers these exceptions on a
+            // call to hasNext() and not on applyStrategies()
+            if (graph instanceof RemoteGraph)
+                t.hasNext();
+            else
+                t.asAdmin().applyStrategies();
+
             if (expectMutatingStep) fail("The strategy should have found a mutating step.");
         } catch (final Exception ise) {
             if (!expectMutatingStep)