tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [1/2] tinkerpop git commit: TINKERPOP-1864 Run python glv tests on GraphSON 2.0 and 3.0
Date Tue, 17 Jul 2018 17:43:09 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 463975846 -> 051892767


TINKERPOP-1864 Run python glv tests on GraphSON 2.0 and 3.0

There was about a 10 second time increase for adding the additional test execution option.
Seems worthwhile.


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

Branch: refs/heads/tp33
Commit: fe447eabfddf099ff7354509d3585cf9ed97ec49
Parents: e1ef8b6
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Thu Jun 21 17:24:58 2018 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Mon Jun 25 12:10:19 2018 -0400

----------------------------------------------------------------------
 gremlin-python/pom.xml                           | 10 +++++++++-
 gremlin-python/src/main/jython/radish/terrain.py | 12 +++++++++++-
 gremlin-python/src/main/jython/setup.py          |  2 +-
 3 files changed, 21 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fe447eab/gremlin-python/pom.xml
----------------------------------------------------------------------
diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml
index e48901c..fdb4642 100644
--- a/gremlin-python/pom.xml
+++ b/gremlin-python/pom.xml
@@ -420,11 +420,19 @@ limitations under the License.
                                             <env key="PYTHONPATH" value=""/>
                                             <arg line="setup.py install"/>
                                         </exec>
+                                        <!-- run for graphson 3.0 -->
                                         <exec executable="env/bin/radish" dir="${project.build.directory}/python2"
                                               failonerror="true">
                                             <env key="PYTHONPATH" value=""/>
                                             <env key="PYTHONIOENCODING" value="utf-8:surrogateescape"/>
-                                            <arg line="-e -t -b ${project.build.directory}/python2/radish
${project.basedir}/../gremlin-test/features/"/> <!-- -no-line-jump -->
+                                            <arg line="-e -t -b ${project.build.directory}/python2/radish
${project.basedir}/../gremlin-test/features/ --user-data=&quot;graphson=v2&quot;"/>
<!-- -no-line-jump -->
+                                        </exec>
+                                        <!-- run for graphson 3.0 -->
+                                        <exec executable="env/bin/radish" dir="${project.build.directory}/python2"
+                                              failonerror="true">
+                                            <env key="PYTHONPATH" value=""/>
+                                            <env key="PYTHONIOENCODING" value="utf-8:surrogateescape"/>
+                                            <arg line="-e -t -b ${project.build.directory}/python2/radish
${project.basedir}/../gremlin-test/features/ --user-data=&quot;graphson=v3&quot;"/>
<!-- -no-line-jump -->
                                         </exec>
                                     </target>
                                 </configuration>

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fe447eab/gremlin-python/src/main/jython/radish/terrain.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/radish/terrain.py b/gremlin-python/src/main/jython/radish/terrain.py
index ba8f372..3da9a0e 100644
--- a/gremlin-python/src/main/jython/radish/terrain.py
+++ b/gremlin-python/src/main/jython/radish/terrain.py
@@ -66,7 +66,17 @@ def prepare_static_traversal_source(features, marker):
 @before.each_scenario
 def prepare_traversal_source(scenario):
     # some tests create data - create a fresh remote to the empty graph and clear that graph
prior to each test
-    remote = DriverRemoteConnection('ws://localhost:45940/gremlin', "ggraph", message_serializer=serializer.GraphSONSerializersV3d0())
+    if not("graphson" in world.config.user_data):
+        raise ValueError('test configuration requires setting of --user-data="graphson=*"
to one of [v2,v3]')
+
+    if world.config.user_data["graphson"] == "v3":
+        s = serializer.GraphSONSerializersV3d0()
+    elif world.config.user_data["graphson"] == "v2":
+        s = serializer.GraphSONSerializersV2d0()
+    else:
+        raise ValueError('serializer set with --user-data="graphson=v2" must be one of [v2,v3]')
+
+    remote = DriverRemoteConnection('ws://localhost:45940/gremlin', "ggraph", message_serializer=s)
     scenario.context.remote_conn["empty"] = remote
     g = Graph().traversal().withRemote(remote)
     g.V().drop().iterate()

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fe447eab/gremlin-python/src/main/jython/setup.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/setup.py b/gremlin-python/src/main/jython/setup.py
index 5d26749..5bde9ed 100644
--- a/gremlin-python/src/main/jython/setup.py
+++ b/gremlin-python/src/main/jython/setup.py
@@ -71,7 +71,7 @@ setup(
     tests_require=[
         'pytest',
         'mock',
-        'radish-bdd==0.8.0',
+        'radish-bdd==0.8.6',
         'PyHamcrest'
     ],
     install_requires=install_requires,


Mime
View raw message