[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16263130#comment-16263130 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user asfgit closed the pull request at: https://github.com/apache/tinkerpop/pull/747 > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16262492#comment-16262492 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on the issue: https://github.com/apache/tinkerpop/pull/747 Nice! lgtm VOTE +1 > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16262408#comment-16262408 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/747 Once I realized that the failure was not preventing the build it was easy to spot the problem. Just pushed a fix. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16262373#comment-16262373 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/747 Interesting. Those errors don't seem to affect the build though - it still passes. I guess it's because we don't run any tests against those particular graphs on the "secure" server? or is it failing and i'm misinterpreting the build output? > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16262205#comment-16262205 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on the issue: https://github.com/apache/tinkerpop/pull/747 I've rebased this on top of `tp32` (after #752 was merged) on my private fork and the issue I've mentioned earlier persists: https://travis-ci.org/jorgebay/tinkerpop/jobs/305703717#L7380 (Ubuntu). I'm changing my VOTE to -1 until this is resolved. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16261376#comment-16261376 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user dkuppitz commented on the issue: https://github.com/apache/tinkerpop/pull/747 VOTE: +1 > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16260530#comment-16260530 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r152230125 --- Diff: gremlin-test/features/sideEffect/Sack.feature --- @@ -0,0 +1,71 @@ +# 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. + +Feature: Step - sack() + + Scenario: g_withSackXhelloX_V_outE_sackXassignX_byXlabelX_inV_sack +Given the modern graph +And the traversal of + """ + g.withSack("hello").V().outE().sack(Operator.assign).by(T.label).inV().sack() + """ +When iterated to list +Then the result should be unordered + | result | + | created | + | knows | + | knows | + | created | + | created | + | created | + + Scenario: g_withSackX0X_V_outE_sackXsumX_byXweightX_inV_sack_sum +Given the modern graph +And the traversal of + """ + g.withSack(0.0).V().outE().sack(Operator.sum).by("weight").inV().sack().sum() + """ +When iterated to list +Then the result should be unordered + | result | + | d[3.5].m | + + Scenario: g_withSackX0X_V_repeatXoutE_sackXsumX_byXweightX_inVX_timesX2X_sack +Given the modern graph +And the traversal of + """ + g.withSack(0.0).V().repeat(__.outE().sack(Operator.sum).by("weight").inV()).times(2).sack() + """ +When iterated to list +Then the result should be unordered + | result | + | d[2.0].d | --- End diff -- These two are also big decimal... > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16259310#comment-16259310 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r152009040 --- Diff: gremlin-test/features/map/Fold.feature --- @@ -0,0 +1,57 @@ +# 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. + +Feature: Step - fold() + + Scenario: g_V_fold +Given the modern graph +And the traversal of + """ + g.V().fold() + """ +When iterated to list +Then the result should be unordered + | result | + | l[v[marko],v[vadas],v[lop],v[josh],v[ripple],v[peter]] | + + Scenario: g_V_fold_unfold +Given the modern graph +And the traversal of + """ + g.V().fold().unfold() + """ +When iterated to list +Then the result should be unordered + | result | + | v[marko] | + | v[vadas] | + | v[lop] | + | v[josh] | + | v[ripple] | + | v[peter] | + + Scenario: g_V_age_foldX0_plusX +Given the modern graph +And the traversal of + """ + g.V().values("age").fold(0, Operator.sum) + """ +When iterated to list +Then the result should be unordered + | result | + | d[123].l | --- End diff -- The expected value is an `int`. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16258933#comment-16258933 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on the issue: https://github.com/apache/tinkerpop/pull/747 @robertdale thanks for looking into it. I'm running `mvn clean install -DskipTests` followed by a `mvn clean install -pl :gremlin-dotnet-tests -P gremlin-dotnet -DskipIntegrationTests=false` on a macOS Sierra. This is the output for `mvn clean install -pl :gremlin-dotnet-tests -P gremlin-dotnet -DskipIntegrationTests=false`: https://gist.github.com/jorgebay/834b28c49290038bf59df11a32ec61ad > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16257371#comment-16257371 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user robertdale commented on the issue: https://github.com/apache/tinkerpop/pull/747 @jorgebay On which OS do you get the test errors? > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16257126#comment-16257126 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/747 yeah - i'm just realizing how i flubbed a bunch of things on the last commit. i was so focused on your .net problems i only ran tests for .net :disappointed: > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16257081#comment-16257081 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r151703665 --- Diff: gremlin-test/features/map/Min.feature --- @@ -0,0 +1,51 @@ +# 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. + +Feature: Step - min() + + Scenario: g_V_age_min +Given the modern graph +And the traversal of + """ + g.V().values("age").min() + """ +When iterated to list +Then the result should be unordered + | result | + | d[27].i | + + Scenario: g_V_repeatXbothX_timesX5X_age_min +Given the modern graph +And the traversal of + """ + g.V().repeat(__.both()).times(5).values("age").min() + """ +When iterated to list +Then the result should be unordered + | result | + | d[27].i | + + Scenario: g_V_hasLabelXsoftwareX_group_byXnameX_byXbothE_weight_minX +Given the modern graph +And the traversal of + """ + g.V().hasLabel("software").group().by("name").by(__.bothE().values("weight").min()) + """ +When iterated to list +Then the result should be unordered + | result | + | m[{"ripple":"d[1.0].d","lop":"d[0.2]d"}] | --- End diff -- Typo: should be `"d[0.2].d"` > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16257038#comment-16257038 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r151698077 --- Diff: gremlin-test/features/sideEffect/Group.feature --- @@ -0,0 +1,244 @@ +# 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. + +Feature: Step - group() + + Scenario: g_V_group_byXnameX +Given the modern graph +And the traversal of + """ + g.V().group().by("name") + """ +When iterated to list +Then the result should be unordered + | result | + | m[{"ripple":"l[v[ripple]]", "peter":"l[v[peter]]", "vadas":"l[v[vadas]]", "josh": "l[v[josh]]", "lop":"l[v[lop]]", "marko":"l[v[marko]]"}] | + + Scenario: g_V_group_byXnameX_by +Given the modern graph +And the traversal of + """ + g.V().group().by("name").by() + """ +When iterated to list +Then the result should be unordered + | result | + | m[{"ripple":"l[v[ripple]]", "peter":"l[v[peter]]", "vadas":"l[v[vadas]]", "josh": "l[v[josh]]", "lop":"l[v[lop]]", "marko":"l[v[marko]]"}] | + + Scenario: g_V_groupXaX_byXnameX_capXaX +Given the modern graph +And the traversal of + """ + g.V().group("a").by("name").cap("a") + """ +When iterated to list +Then the result should be unordered + | result | + | m[{"ripple":"l[v[ripple]]", "peter":"l[v[peter]]", "vadas":"l[v[vadas]]", "josh": "l[v[josh]]", "lop":"l[v[lop]]", "marko":"l[v[marko]]"}] | + + Scenario: g_V_hasXlangX_groupXaX_byXlangX_byXnameX_out_capXaX +Given the modern graph +And the traversal of + """ + g.V().has("lang").group("a").by("lang").by("name").out().cap("a") + """ +When iterated to list +Then the result should be unordered + | result | + | m[{"java":["lop","ripple"]}] | + + Scenario: g_V_hasXlangX_group_byXlangX_byXcountX +Given the modern graph +And the traversal of + """ + g.V().has("lang").group().by("lang").by(__.count()) + """ +When iterated to list +Then the result should be unordered + | result | + | m[{"java":"d[2].l"}] | + + Scenario: g_V_repeatXout_groupXaX_byXnameX_byXcountX_timesX2X_capXaX +Given the modern graph +And the traversal of + """ + g.V().repeat(__.out().group("a").by("name").by(__.count())).times(2).cap("a") + """ +When iterated to list +Then the result should be unordered + | result | + | m[{"ripple":"d[2].l", "vadas":"d[1].l", "josh":"d[1].l", "lop":"d[4].l"}] | + + Scenario: g_V_group_byXoutE_countX_byXnameX +Given an unsupported test +Then nothing should happen because + """ + The result returned is not supported under GraphSON 2.x and therefore cannot be properly asserted. More + specifically it has numeric keys which basically get toString()'d under GraphSON 2.x. This test can be supported + with GraphSON 3.x. + """ + + Scenario: g_V_groupXaX_byXlabelX_byXoutE_weight_sumX_capXaX +Given the modern graph +And the traversal of + """ + g.V().group("a").by(T.label).by(__.outE().values("weight").sum()).cap("a") + """ +When iterated to list +Then the result should be unordered + | result | + | m[{"software":"d[0].i", "person":"d[3.5].d}] | --- End diff -- Typo `"d[3.5].d"` > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type:
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16255517#comment-16255517 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r151456526 --- Diff: gremlin-test/features/branch/Choose.feature --- @@ -0,0 +1,124 @@ +# 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. + +Feature: Step - choose() + + Scenario: g_V_chooseXout_countX_optionX2L__nameX_optionX3L__valueMapX +Given the modern graph +And the traversal of + """ + g.V().choose(__.out().count()). +option(2L, __.values("name")). +option(3L, __.valueMap()) + """ +When iterated to list +Then the result should be unordered + | result | + | m[{"name":["marko"], "age":[29]}] | --- End diff -- We should specify the expected numeric type when describing map results because it has different meaning across different scenarios, here is an `int32`, below it's also a `int64` (ie: `groupCount()`) and also a `double`. The json literal for numbers could be reserved for `double` (JS `Number` underlying representation) and the rest we could use something like: - `m[{"age":"d[29]"}]`, value is an `int32`. - `m[{"age":"d[29L]"}]`, value is an `int64`. - `m[{"age":29}]`, value is an `double`. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16253332#comment-16253332 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/747 This is strange. That command works for me. I'm not sure what could be wrong. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16253302#comment-16253302 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on the issue: https://github.com/apache/tinkerpop/pull/747 I'm getting a path related issue on Gremlin.Net - Test module, while executing: ``` mvn clean install -pl :gremlin-dotnet-tests -P gremlin-dotnet -DskipIntegrationTests=false ``` From the root directory, I get: ``` [INFO] Starting Gremlin Server instances for native testing of Apache TinkerPop :: Gremlin.Net - Tests [INFO] Configured Metrics Slf4jReporter configured with interval=18ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics [INFO] Graph [graph] was successfully configured via [/Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/tinkergraph-empty.properties]. [INFO] Graph [classic] was successfully configured via [/Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/tinkergraph-empty.properties]. [INFO] Graph [modern] was successfully configured via [/Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/tinkergraph-empty.properties]. [INFO] Graph [crew] was successfully configured via [/Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/tinkergraph-empty.properties]. [INFO] Graph [grateful] was successfully configured via [/Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/tinkergraph-empty.properties]. [INFO] Initialized Gremlin thread pool. Threads in pool named with pattern gremlin-* [INFO] Loaded gremlin-groovy ScriptEngine [INFO] Initialized gremlin-groovy ScriptEngine with /Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/generate-all.groovy [INFO] Initialized GremlinExecutor and preparing GremlinScriptEngines instances. [INFO] Initialized gremlin-groovy GremlinScriptEngine and registered metrics [INFO] A GraphTraversalSource is now bound to [ggraph] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] A GraphTraversalSource is now bound to [g] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] A GraphTraversalSource is now bound to [gmodern] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] A GraphTraversalSource is now bound to [gclassic] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] A GraphTraversalSource is now bound to [gcrew] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] A GraphTraversalSource is now bound to [ggrateful] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] Adding the standard OpProcessor. [INFO] Adding the control OpProcessor. [INFO] Adding the session OpProcessor. [INFO] Adding the traversal OpProcessor. [INFO] Initialized cache for TraversalOpProcessor with size 1000 and expiration time of 60 ms [INFO] Executing start up LifeCycleHook [INFO] Configured application/vnd.gremlin-v1.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 [WARNING] The org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0 serialization class is deprecated. [INFO] Configured application/vnd.gremlin-v1.0+gryo-lite with org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0 [INFO] Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 [INFO] Configured application/vnd.gremlin-v1.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0 [INFO] Configured application/vnd.gremlin-v2.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0 [INFO] Configured application/json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 [INFO] Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1. [INFO] Channel started at port 45940. [INFO] Gremlin Server with no authentication started on port 45940 [WARNING] Graph [graph] configured at [conf/tinkergraph-empty.properties] could not be instantiated and will not be available in Gremlin Server. GraphFactory message: The location configuration must resolve to a file and [conf/tinkergraph-empty.properties] does not java.lang.IllegalArgumentException: The location configuration must resolve to a file and [conf/tinkergraph-empty.properties] does not at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.getConfiguration(GraphFactory.java:121) ``` The same issue appears for `classic`, `modern`, `crew`, ... graphs. > Gremlin Language Test Suite > --- > >
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16251327#comment-16251327 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on the issue: https://github.com/apache/tinkerpop/pull/747 Ah, I see its possible to run integration test using: ``` mvn clean install -pl :gremlin-dotnet-source,:gremlin-dotnet-tests -P gremlin-dotnet -DskipIntegrationTests=false ``` I don't think its necessary to allow builds from a subdir, so don't mind... as there is a way to build the projects themselves with a profile that includes integration tests Thanks, my maven-fu is not strong at all. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16251289#comment-16251289 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/747 I think that there are a lot of path issues when building from outside of the root directory - gremlin-dotnet is not the only one. i typically just do this: ```text mvn clean install -pl :gremlin-dotnet-source,:gremlin-dotnet-tests -DskipIntegrationTests=false ``` If you think it's important to fix the path problems you get when running from a sub-directory, I think it's best to create an issue in JIRA and I can come back to it later. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16251223#comment-16251223 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on the issue: https://github.com/apache/tinkerpop/pull/747 hm... with the new server start scripts, when running from within a directory like: ``` cd gremlin-dotnet mvn clean install -P gremlin-dotnet ``` I get the following issues: ``` [INFO] Using Groovy 2.4.11 to perform execute. [INFO] Starting Gremlin Server instances for native testing of Apache TinkerPop :: Gremlin.Net - Tests [INFO] Configured Metrics Slf4jReporter configured with interval=18ms and loggerName=org.apache.tinkerpop.gremlin.server.Settings$Slf4jReporterMetrics [INFO] Graph [graph] was successfully configured via [/Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/tinkergraph-empty.properties]. [INFO] Graph [classic] was successfully configured via [/Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/tinkergraph-empty.properties]. [INFO] Graph [modern] was successfully configured via [/Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/tinkergraph-empty.properties]. [INFO] Graph [crew] was successfully configured via [/Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/tinkergraph-empty.properties]. [INFO] Graph [grateful] was successfully configured via [/Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/tinkergraph-empty.properties]. [INFO] Initialized Gremlin thread pool. Threads in pool named with pattern gremlin-* [INFO] Loaded gremlin-groovy ScriptEngine [INFO] Initialized gremlin-groovy ScriptEngine with /Users/jorge/workspace/tinkerpop/gremlin-server/src/test/scripts/generate-all.groovy [INFO] Initialized GremlinExecutor and preparing GremlinScriptEngines instances. [INFO] Initialized gremlin-groovy GremlinScriptEngine and registered metrics [INFO] A GraphTraversalSource is now bound to [gclassic] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] A GraphTraversalSource is now bound to [gcrew] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] A GraphTraversalSource is now bound to [ggraph] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] A GraphTraversalSource is now bound to [g] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] A GraphTraversalSource is now bound to [gmodern] with graphtraversalsource[tinkergraph[vertices:0 edges:0], standard] [INFO] Adding the standard OpProcessor. [INFO] Adding the control OpProcessor. [INFO] Adding the session OpProcessor. [INFO] Adding the traversal OpProcessor. [INFO] Initialized cache for TraversalOpProcessor with size 1000 and expiration time of 60 ms [INFO] Executing start up LifeCycleHook [INFO] Configured application/vnd.gremlin-v1.0+gryo with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 [WARNING] The org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0 serialization class is deprecated. [INFO] Configured application/vnd.gremlin-v1.0+gryo-lite with org.apache.tinkerpop.gremlin.driver.ser.GryoLiteMessageSerializerV1d0 [INFO] Configured application/vnd.gremlin-v1.0+gryo-stringd with org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0 [INFO] Configured application/vnd.gremlin-v1.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV1d0 [INFO] Configured application/vnd.gremlin-v2.0+json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerGremlinV2d0 [INFO] Configured application/json with org.apache.tinkerpop.gremlin.driver.ser.GraphSONMessageSerializerV1d0 [INFO] Gremlin Server configured with worker thread pool of 1, gremlin pool of 8 and boss thread pool of 1. [INFO] Channel started at port 45940. [INFO] Gremlin Server with no authentication started on port 45940 [WARNING] Graph [graph] configured at [conf/tinkergraph-empty.properties] could not be instantiated and will not be available in Gremlin Server. GraphFactory message: The location configuration must resolve to a file and [conf/tinkergraph-empty.properties] does not java.lang.IllegalArgumentException: The location configuration must resolve to a file and [conf/tinkergraph-empty.properties] does not at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.getConfiguration(GraphFactory.java:121) at org.apache.tinkerpop.gremlin.structure.util.GraphFactory.open(GraphFactory.java:104) at ... [WARNING] Graph [classic] configured at [conf/tinkergraph-empty.properties] could not be instantiated and will not be available in
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249753#comment-16249753 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on the issue: https://github.com/apache/tinkerpop/pull/747 `docker/build.sh -t -n -i` succeeds and tests pass. VOTE: +1 > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249576#comment-16249576 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on the issue: https://github.com/apache/tinkerpop/pull/747 Fixes look good to me! I'm running integration tests locally on docker and I'll come back to give my plus one. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249570#comment-16249570 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r150542775 --- Diff: gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java --- @@ -0,0 +1,131 @@ +/* + * 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.process; + +import org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.branch.ChooseTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.branch.OptionalTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CoinTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.ValueMapTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.StoreTest; +import org.junit.Ignore; +import org.junit.Test; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + +/** + * @author Stephen Mallette (http://stephen.genoprime.com) + */ +public class FeatureCoverageTest { + +private static Pattern scenarioName = Pattern.compile("^\\s*Scenario:\\s*(.*)$"); + +@Test +@Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later") +public void shouldImplementAllProcessTestsAsFeatures() throws Exception { --- End diff -- sgtm > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249569#comment-16249569 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r150542730 --- Diff: gremlin-python/src/main/jython/radish/feature_steps.py --- @@ -0,0 +1,231 @@ +''' +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. +''' + +import json +import re +from gremlin_python.structure.graph import Graph, Path +from gremlin_python.process.graph_traversal import __ +from gremlin_python.process.traversal import Cardinality, P, Scope, Column, Order, Direction, T, Pick, Operator +from radish import given, when, then +from hamcrest import * + +regex_and = re.compile(r"([(.,\s])and\(") +regex_as = re.compile(r"([(.,\s])as\(") +regex_from = re.compile(r"([(.,\s])from\(") +regex_global = re.compile(r"([(.,\s])global") +regex_in = re.compile(r"([(.,\s])in\(") +regex_is = re.compile(r"([(.,\s])is\(") +regex_not = re.compile(r"([(.,\s])not\(") +regex_or = re.compile(r"([(.,\s])or\(") + + +ignores = [ +"g.V(v1Id).out().inject(v2).values(\"name\")" # bug in attachment won't connect v2 + ] + + +@given("the {graph_name:w} graph") +def choose_graph(step, graph_name): +step.context.g = Graph().traversal().withRemote(step.context.remote_conn[graph_name]) + + +@given("the graph initializer of") +def initialize_graph(step): +traversal = _make_traversal(step.context.g, step.text, {}) + +# just be sure that the traversal returns something to prove that it worked to some degree. probably +# is overkill to try to assert the complete success of this init operation. presumably the test +# suite would fail elsewhere if this didn't work which would help identify a problem. +assert len(traversal.toList()) > 0 + + +@given("an unsupported test") +def unsupported_scenario(step): +# this is a do nothing step as the test can't be supported for whatever reason +return + + +@given("using the parameter {param_name:w} defined as {param:QuotedString}") +def add_parameter(step, param_name, param): +if not hasattr(step.context, "traversal_params"): +step.context.traversal_params = {} + +step.context.traversal_params[param_name] = _convert(param, step.context) + + +@given("the traversal of") +def translate_traversal(step): +step.context.ignore = ignores.__contains__(step.text) +step.context.traversal = _make_traversal( +step.context.g, step.text, +step.context.traversal_params if hasattr(step.context, "traversal_params") else {}) + + +@when("iterated to list") +def iterate_the_traversal(step): +step.context.result = map(lambda x: _convert_results(x), step.context.traversal.toList()) + + +@when("iterated next") +def next_the_traversal(step): +step.context.result = map(lambda x: _convert_results(x), step.context.traversal.next()) + + +@then("the result should be {characterized_as:w}") +def assert_result(step, characterized_as): +if step.context.ignore: +return + +if characterized_as == "empty":# no results +assert_that(len(step.context.result), equal_to(0)) +elif characterized_as == "ordered":# results asserted in the order of the data table +_table_assertion(step.table, step.context.result, step.context, True) +elif characterized_as == "unordered": # results asserted in any order +_table_assertion(step.table, step.context.result, step.context, False) +elif characterized_as == "of": # results may be of any of the specified items in the data table +_any_assertion(step.table, step.context.result, step.context) +else: +raise
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249536#comment-16249536 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user spmallette commented on the issue: https://github.com/apache/tinkerpop/pull/747 @jorgebay fixed all the nits - thanks. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249532#comment-16249532 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user spmallette commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r150531652 --- Diff: gremlin-test/src/test/java/org/apache/tinkerpop/gremlin/process/FeatureCoverageTest.java --- @@ -0,0 +1,131 @@ +/* + * 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.process; + +import org.apache.tinkerpop.gremlin.process.traversal.step.branch.BranchTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.branch.ChooseTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.branch.OptionalTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.CoinTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.DropTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.FilterTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.IsTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.filter.OrTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.CountTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.PathTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.ProjectTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.ValueMapTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.map.VertexTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.AggregateTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.GroupCountTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.InjectTest; +import org.apache.tinkerpop.gremlin.process.traversal.step.sideEffect.StoreTest; +import org.junit.Ignore; +import org.junit.Test; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import static org.hamcrest.core.Is.is; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThat; + +/** + * @author Stephen Mallette (http://stephen.genoprime.com) + */ +public class FeatureCoverageTest { + +private static Pattern scenarioName = Pattern.compile("^\\s*Scenario:\\s*(.*)$"); + +@Test +@Ignore("As it stands we won't have all of these tests migrated initially so there is no point to running this in full - it can be flipped on later") +public void shouldImplementAllProcessTestsAsFeatures() throws Exception { --- End diff -- As long as we continue to rely on the java process test suite I think it should run on every build. I can see people adding tests to the process suite but not to the GLV suite. Better to just catch it on `mvn clean install` than on a periodic test run to ensure the suites stay in sync. It's not a lengthy test I don't thinkpretty fast to do the comparisons. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249454#comment-16249454 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r150497558 --- Diff: gremlin-python/src/main/jython/radish/feature_steps.py --- @@ -0,0 +1,231 @@ +''' +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. +''' + +import json +import re +from gremlin_python.structure.graph import Graph, Path +from gremlin_python.process.graph_traversal import __ +from gremlin_python.process.traversal import Cardinality, P, Scope, Column, Order, Direction, T, Pick, Operator +from radish import given, when, then +from hamcrest import * + +regex_and = re.compile(r"([(.,\s])and\(") +regex_as = re.compile(r"([(.,\s])as\(") +regex_from = re.compile(r"([(.,\s])from\(") +regex_global = re.compile(r"([(.,\s])global") +regex_in = re.compile(r"([(.,\s])in\(") +regex_is = re.compile(r"([(.,\s])is\(") +regex_not = re.compile(r"([(.,\s])not\(") +regex_or = re.compile(r"([(.,\s])or\(") + + +ignores = [ +"g.V(v1Id).out().inject(v2).values(\"name\")" # bug in attachment won't connect v2 + ] + + +@given("the {graph_name:w} graph") +def choose_graph(step, graph_name): +step.context.g = Graph().traversal().withRemote(step.context.remote_conn[graph_name]) + + +@given("the graph initializer of") +def initialize_graph(step): +traversal = _make_traversal(step.context.g, step.text, {}) + +# just be sure that the traversal returns something to prove that it worked to some degree. probably +# is overkill to try to assert the complete success of this init operation. presumably the test +# suite would fail elsewhere if this didn't work which would help identify a problem. +assert len(traversal.toList()) > 0 + + +@given("an unsupported test") +def unsupported_scenario(step): +# this is a do nothing step as the test can't be supported for whatever reason +return + + +@given("using the parameter {param_name:w} defined as {param:QuotedString}") +def add_parameter(step, param_name, param): +if not hasattr(step.context, "traversal_params"): +step.context.traversal_params = {} + +step.context.traversal_params[param_name] = _convert(param, step.context) + + +@given("the traversal of") +def translate_traversal(step): +step.context.ignore = ignores.__contains__(step.text) +step.context.traversal = _make_traversal( +step.context.g, step.text, +step.context.traversal_params if hasattr(step.context, "traversal_params") else {}) + + +@when("iterated to list") +def iterate_the_traversal(step): +step.context.result = map(lambda x: _convert_results(x), step.context.traversal.toList()) + + +@when("iterated next") +def next_the_traversal(step): +step.context.result = map(lambda x: _convert_results(x), step.context.traversal.next()) + + +@then("the result should be {characterized_as:w}") +def assert_result(step, characterized_as): +if step.context.ignore: +return + +if characterized_as == "empty":# no results +assert_that(len(step.context.result), equal_to(0)) +elif characterized_as == "ordered":# results asserted in the order of the data table +_table_assertion(step.table, step.context.result, step.context, True) +elif characterized_as == "unordered": # results asserted in any order +_table_assertion(step.table, step.context.result, step.context, False) +elif characterized_as == "of": # results may be of any of the specified items in the data table +_any_assertion(step.table, step.context.result, step.context) +else: +raise
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249453#comment-16249453 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r150477310 --- Diff: gremlin-python/pom.xml --- @@ -440,6 +440,17 @@ limitations under the License. + + + + + + + + + --- End diff -- Nit: undesired additional spaces after `exec` close tag. > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249455#comment-16249455 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r150517147 --- Diff: gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteConnection.cs --- @@ -36,15 +36,27 @@ namespace Gremlin.Net.Driver.Remote public class DriverRemoteConnection : IRemoteConnection, IDisposable { private readonly IGremlinClient _client; +private readonly string _traversalSource; /// /// Initializes a new . /// /// The that will be used for the connection. /// Thrown when client is null. -public DriverRemoteConnection(IGremlinClient client) +public DriverRemoteConnection(IGremlinClient client):this(client, "g") +{ +} + +/// +/// Initializes a new . +/// +/// The that will be used for the connection. +/// The name of the traversal source on the server to bind to. +/// Thrown when client is null. +public DriverRemoteConnection(IGremlinClient client, string traversalSource) { _client = client ?? throw new ArgumentNullException(nameof(client)); +_traversalSource = traversalSource; --- End diff -- We could add null validation in the same form: ```csharp _traversalSource = traversalSource ?? throw new ArgumentNullException(nameof(traversalSource)); ``` > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249456#comment-16249456 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r150476717 --- Diff: gremlin-dotnet/src/Gremlin.Net/Driver/Remote/DriverRemoteConnection.cs --- @@ -36,15 +36,27 @@ namespace Gremlin.Net.Driver.Remote public class DriverRemoteConnection : IRemoteConnection, IDisposable { private readonly IGremlinClient _client; +private readonly string _traversalSource; --- End diff -- C# skills :) > Gremlin Language Test Suite > --- > > Key: TINKERPOP-1784 > URL: https://issues.apache.org/jira/browse/TINKERPOP-1784 > Project: TinkerPop > Issue Type: Improvement > Components: test-suite >Affects Versions: 3.2.6 >Reporter: stephen mallette >Assignee: stephen mallette > > Provide for a more language agnostic test framework for the Gremlin Language > so that we can properly test GLVs. The current test suite is completely tied > to the JVM. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249457#comment-16249457 ] ASF GitHub Bot commented on TINKERPOP-1784: --- Github user jorgebay commented on a diff in the pull request: https://github.com/apache/tinkerpop/pull/747#discussion_r150517817 --- Diff: gremlin-python/src/main/jython/radish/feature_steps.py --- @@ -0,0 +1,231 @@ +''' +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. +''' + +import json +import re +from gremlin_python.structure.graph import Graph, Path +from gremlin_python.process.graph_traversal import __ +from gremlin_python.process.traversal import Cardinality, P, Scope, Column, Order, Direction, T, Pick, Operator +from radish import given, when, then +from hamcrest import * + +regex_and = re.compile(r"([(.,\s])and\(") +regex_as = re.compile(r"([(.,\s])as\(") +regex_from = re.compile(r"([(.,\s])from\(") +regex_global = re.compile(r"([(.,\s])global") +regex_in = re.compile(r"([(.,\s])in\(") +regex_is = re.compile(r"([(.,\s])is\(") +regex_not = re.compile(r"([(.,\s])not\(") +regex_or = re.compile(r"([(.,\s])or\(") + + +ignores = [ +"g.V(v1Id).out().inject(v2).values(\"name\")" # bug in attachment won't connect v2 + ] + + +@given("the {graph_name:w} graph") +def choose_graph(step, graph_name): +step.context.g = Graph().traversal().withRemote(step.context.remote_conn[graph_name]) + + +@given("the graph initializer of") +def initialize_graph(step): +traversal = _make_traversal(step.context.g, step.text, {}) + +# just be sure that the traversal returns something to prove that it worked to some degree. probably +# is overkill to try to assert the complete success of this init operation. presumably the test +# suite would fail elsewhere if this didn't work which would help identify a problem. +assert len(traversal.toList()) > 0 + + +@given("an unsupported test") +def unsupported_scenario(step): +# this is a do nothing step as the test can't be supported for whatever reason +return + + +@given("using the parameter {param_name:w} defined as {param:QuotedString}") +def add_parameter(step, param_name, param): +if not hasattr(step.context, "traversal_params"): +step.context.traversal_params = {} + +step.context.traversal_params[param_name] = _convert(param, step.context) + + +@given("the traversal of") +def translate_traversal(step): +step.context.ignore = ignores.__contains__(step.text) +step.context.traversal = _make_traversal( +step.context.g, step.text, +step.context.traversal_params if hasattr(step.context, "traversal_params") else {}) + + +@when("iterated to list") +def iterate_the_traversal(step): +step.context.result = map(lambda x: _convert_results(x), step.context.traversal.toList()) + + +@when("iterated next") +def next_the_traversal(step): +step.context.result = map(lambda x: _convert_results(x), step.context.traversal.next()) + + +@then("the result should be {characterized_as:w}") +def assert_result(step, characterized_as): +if step.context.ignore: +return + +if characterized_as == "empty":# no results +assert_that(len(step.context.result), equal_to(0)) +elif characterized_as == "ordered":# results asserted in the order of the data table +_table_assertion(step.table, step.context.result, step.context, True) +elif characterized_as == "unordered": # results asserted in any order +_table_assertion(step.table, step.context.result, step.context, False) +elif characterized_as == "of": # results may be of any of the specified items in the data table +_any_assertion(step.table, step.context.result, step.context) +else: +raise
[jira] [Commented] (TINKERPOP-1784) Gremlin Language Test Suite
[ https://issues.apache.org/jira/browse/TINKERPOP-1784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16249011#comment-16249011 ] ASF GitHub Bot commented on TINKERPOP-1784: --- GitHub user spmallette opened a pull request: https://github.com/apache/tinkerpop/pull/747 TINKERPOP-1784 GLV Test Framework https://issues.apache.org/jira/browse/TINKERPOP-1784 This PR is for the GLV Test Framework. It contains an implementation for gremlin-python. It is not a complete porting of all the process test suite, but does provide coverage for almost all steps. I think I've built enough here to provide enough for evaluation of the framework itself - my intention is to backfill tests after this merges. I do think I have enough tests here to yield confidence in GLVs that implement it, thus allowing baseline for official release. All tests pass with `docker/build.sh -t -n -i` VOTE +1 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/tinkerpop TINKERPOP-1784 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/tinkerpop/pull/747.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #747 commit 61e667ddb91eb96560793843054678d4c0a925de Author: Stephen MalletteDate: 2017-09-14T19:44:32Z TINKERPOP-1784 Initial implementation of a new language agnostic test suite Uses Gherkin to write test specifications that will be implemented by the various GLVs. Provided a basic implementation for gremlin-python. commit ce16228ea8780b0ff60f0ff1a11a4a127dde6744 Author: Stephen Mallette Date: 2017-09-20T17:32:54Z TINKERPOP-1784 Use python eval() to setup test traversals commit 2b92f5b20ba5e8c9f7e49f1e5ac7428c284d6603 Author: Stephen Mallette Date: 2017-09-20T17:39:00Z TINKERPOP-1784 Categorize feature by step type This matches he pattern of the java test suite. commit eb595a6c737fa0d49df3c0062c7c463088fecda6 Author: Stephen Mallette Date: 2017-09-20T22:38:49Z TINKERPOP-1784 Added coin() gherkin tests and refactored python commit 7aa1adcb3d1a719cb75b218bb9fa3a83112213de Author: Stephen Mallette Date: 2017-09-22T14:52:20Z TINKERPOP-1784 Expanded GLV test framework a bit further Developed methods for vertices/maps and a way to assert unordered results. commit b129ed30b02388710e9c39338026462d4cf88955 Author: Stephen Mallette Date: 2017-09-22T16:56:08Z TINKERPOP-1784 Added some basic support to convert vertex string to a vertex object This might be the pattern to use across the board. We'll see if there is a better idea floating about though so may not be final. commit de32b78efe432e6b57399ca9db673ddeead313ad Author: Stephen Mallette Date: 2017-09-22T17:49:50Z TINKERPOP-1784 Minor refactoring of python gherkin steps commit 35aca028cbc0ccd96823e842626169b7d7b7f1e7 Author: Stephen Mallette Date: 2017-09-22T18:43:13Z TINKERPOP-1784 Added support for numeric keys in glv tests commit 14b8d3bbeacf0ee1ec500174009c8487aa1238a6 Author: Stephen Mallette Date: 2017-09-23T11:12:07Z TINKERPOP-1784 Added test for select in GLV tests Included infrastructure for validating maps and refactored other related code. commit 17fd3b027effc0f7b055e1934307b2c4b90ed84b Author: Stephen Mallette Date: 2017-09-27T16:16:08Z TINKERPOP-1784 Provided translation for python specific syntax Included a way to specify element identifiers in feature files. commit 655377380654755fb031b9d92e10fd9376665b68 Author: Stephen Mallette Date: 2017-09-27T17:26:17Z TINKERPOP-1784 Added test to enforce implementation of process tests as features commit db6c8560d883891d0c3c53ab0fc7a9b40adca9d3 Author: Stephen Mallette Date: 2017-09-27T20:18:14Z TINKERPOP-1784 Added edge assertion support commit f33b2b8d588d68e0374958b5aa37b32c9dc59211 Author: Stephen Mallette Date: 2017-09-28T14:29:47Z TINKERPOP-1784 Added some more vertex tests commit 55145980b99ed78a1de82ecefe199062439ea573 Author: Stephen Mallette Date: 2017-09-28T18:54:40Z TINKERPOP-1784 Changed assertion logic and table formats in feature files commit bed1d7c5e7aa0d1cd7fbed9914c541c48c79df86 Author: Stephen Mallette Date: 2017-09-28T19:17:14Z TINKERPOP-1784 Refactored the assertion logic for ordered/unordered commit a9f273f603c08d958a4a25cdc7504a9a1a91bd30 Author: Stephen Mallette Date: