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/08/26 14:53:44 UTC

[1/2] tinkerpop git commit: Minor change to ant-run plugin so as to allow binding to test.

Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1278 9e449df23 -> 186f26ba0


Minor change to ant-run plugin so as to allow binding to test.

Without this change binding exec-plugin to test imposes a block in maven that requires user input.


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

Branch: refs/heads/TINKERPOP-1278
Commit: 4191efc59c0a8323468d9cc2b5f6735869c3301d
Parents: 9e449df
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Aug 26 09:25:51 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Aug 26 09:25:51 2016 -0400

----------------------------------------------------------------------
 gremlin-python/pom.xml | 39 +++++++++++++++++++++------------------
 1 file changed, 21 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/4191efc5/gremlin-python/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml
index 9a6d75b..d7006f9 100644
--- a/gremlin-python/pom.xml
+++ b/gremlin-python/pom.xml
@@ -98,17 +98,37 @@
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>createThriftDir</id>
+                        <id>create-python-reports-directory</id>
                         <phase>process-resources</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
                         <configuration>
                             <tasks>
                                 <delete dir="${build.directory}/python-reports"/>
                                 <mkdir dir="${build.directory}/python-reports"/>
                             </tasks>
                         </configuration>
+                    </execution>
+                    <!--
+                    use pytest to execute native python tests - output of xunit output is configured in setup.cfg.
+                    had to use the ant plugin - maven-exec-plugin
+                    -->
+                    <execution>
+                        <phase>integration-test</phase>
                         <goals>
                             <goal>run</goal>
                         </goals>
+                        <configuration>
+                            <skip>${skipTests}</skip>
+                            <target>
+                                <exec executable="python"
+                                      dir="${basedir}/target/python">
+                                    <arg value="setup.py"/>
+                                    <arg value="test"/>
+                                </exec>
+                            </target>
+                        </configuration>
                     </execution>
                 </executions>
             </plugin>
@@ -144,23 +164,6 @@
                             </commandlineArgs>
                         </configuration>
                     </execution>
-                    <!-- use pytest to execute native python tests - output of xunit output is configured in setup.cfg -->
-                    <execution>
-                        <id>test-python</id>
-                        <phase>generate-test-resources</phase>
-                        <goals>
-                            <goal>exec</goal>
-                        </goals>
-                        <configuration>
-                            <executable>python</executable>
-                            <workingDirectory>${basedir}/target/python</workingDirectory>
-                            <skip>${skipTests}</skip>
-                            <arguments>
-                                <argument>setup.py</argument>
-                                <argument>test</argument>
-                            </arguments>
-                        </configuration>
-                    </execution>
                 </executions>
             </plugin>
             <plugin>


[2/2] tinkerpop git commit: Added a bit of logging and error handling.

Posted by sp...@apache.org.
Added a bit of logging and error handling.


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

Branch: refs/heads/TINKERPOP-1278
Commit: 186f26ba08ca8ee2408003f98a1579bc999ccd36
Parents: 4191efc
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Aug 26 10:53:13 2016 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Aug 26 10:53:13 2016 -0400

----------------------------------------------------------------------
 .../server/op/traversal/TraversalOpProcessor.java   | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/186f26ba/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
index b44c51b..108d3fc 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/op/traversal/TraversalOpProcessor.java
@@ -180,12 +180,10 @@ public class TraversalOpProcessor extends AbstractOpProcessor {
                     final Optional<UUID> sideEffect = msg.optionalArgs(Tokens.ARGS_SIDE_EFFECT);
                     final TraversalSideEffects sideEffects = cache.getIfPresent(sideEffect.get());
 
-                    if (null == sideEffects) {
-                        final String msgDefault = String.format("Could not find side-effects for %s.", sideEffect.get());
-                        throw new OpProcessorException(msgDefault, ResponseMessage.build(message).code(ResponseStatusCode.SERVER_ERROR).statusMessage(msgDefault).create());
-                    }
+                    if (null == sideEffects)
+                        logger.warn("Request for side-effect keys on %s returned no side-effects in the cache", sideEffect.get());
 
-                    handleIterator(context, sideEffects.keys().iterator());
+                    handleIterator(context, null == sideEffects ? Collections.emptyIterator() : sideEffects.keys().iterator());
                 };
 
                 break;
@@ -284,6 +282,14 @@ public class TraversalOpProcessor extends AbstractOpProcessor {
                             return;
                         }
 
+                        if (!sideEffects.exists(sideEffectKey.get())) {
+                            final String errorMessage = String.format("Could not find side-effect key for %s in %s.", sideEffectKey.get(), sideEffect.get());
+                            logger.warn(errorMessage);
+                            ctx.writeAndFlush(ResponseMessage.build(msg).code(ResponseStatusCode.SERVER_ERROR).statusMessage(errorMessage).create());
+                            onError(graph, context);
+                            return;
+                        }
+
                         handleIterator(context, new SideEffectIterator(sideEffects.get(sideEffectKey.get()), sideEffectKey.get()));
                     } catch (TimeoutException ex) {
                         final String errorMessage = String.format("Response iteration exceeded the configured threshold for request [%s] - %s", msg.getRequestId(), ex.getMessage());