Skip to content

Commit

Permalink
Updates feature test tags and world configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
Cole-Greer committed Dec 5, 2024
1 parent 01569ee commit 66e7e6f
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 11 deletions.
2 changes: 2 additions & 0 deletions docs/src/dev/developer/for-committers.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,8 @@ tries to reference inaccessible properties that are on elements only available b
`GraphComputer`.
* `@GraphComputerVerificationStarGraphExceeded` - The scenario itself is not written to support `GraphComputer` because
the traversal does not mind the star graph limitation.
* `@GremlinGroovyNotSupported` - The scenario uses `gremlin-lang` syntax which is incompatible with `gremlin-groovy` and
cannot be resolved with the groovy translator. This is typically for scenarios using ambiguously-types `null` parameters.
* `@InsertionOrderingRequired` - The scenario is reliant on the graph system predictably returning results (vertices, edges, properties) in the same order in which they were inserted into the graph.
* `@MetaProperties` - The scenario makes use of meta-properties.
* `@MultiProperties` - The scenario makes use of multi-properties.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

@RunWith(Cucumber.class)
@CucumberOptions(
tags = "not @RemoteOnly and not @GraphComputerOnly and not @AllowNullPropertyValues and not @GremlinLangScriptOnly",
tags = "not @RemoteOnly and not @GraphComputerOnly and not @AllowNullPropertyValues and not @GremlinGroovyNotSupported",
glue = { "org.apache.tinkerpop.gremlin.features" },
objectFactory = GraphBinaryGroovyRemoteParameterizedFeatureTest.RemoteGuiceFactory.class,
features = { "classpath:/org/apache/tinkerpop/gremlin/test/features" },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ Feature: Step - mergeE()
And the graph should return 1 for count of "g.E()"
And the graph should return 1 for count of "g.V()"

@GremlinLangScriptOnly
Scenario: g_V_mergeE_inlineXemptyX_optionXonCreate_nullX
Given the empty graph
And the graph initializer of
Expand Down Expand Up @@ -258,7 +257,6 @@ Feature: Step - mergeE()
And the graph should return 2 for count of "g.E()"
And the graph should return 2 for count of "g.V()"

@GremlinLangScriptOnly
Scenario: g_mergeEXnullX
Given the empty graph
And the graph initializer of
Expand All @@ -272,7 +270,7 @@ Feature: Step - mergeE()
When iterated to list
Then the traversal will raise an error with message containing text of "Out Vertex not specified"

@GremlinLangScriptOnly
@GremlinGroovyNotSupported
Scenario: g_mergeEXnullvarX
Given the empty graph
And the graph initializer of
Expand All @@ -287,7 +285,7 @@ Feature: Step - mergeE()
When iterated to list
Then the traversal will raise an error with message containing text of "Out Vertex not specified"

@GremlinLangScriptOnly
@GremlinGroovyNotSupported
Scenario: g_V_limitX1X_mergeEXnullvarX
Given the empty graph
And the graph initializer of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ Feature: Step - mergeV()
Then the result should have a count of 1
And the graph should return 1 for count of "g.V()"

@GremlinLangScriptOnly
@GremlinGroovyNotSupported
Scenario: g_mergeVXnullvarX
Given the empty graph
And the graph initializer of
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ Feature: Step - inject()
| result |
| l[d[1].i,d[3].i,d[100].i,d[300].i] |

@GraphComputerVerificationInjectionNotSupported @GremlinLangScriptOnly
@GraphComputerVerificationInjectionNotSupported
Scenario: g_injectX1_3_100_300X_listvar
Given the modern graph
And using the parameter xx1 defined as "l[d[1].i,d[3].i,d[100].i,d[300].i]"
Expand All @@ -275,7 +275,7 @@ Feature: Step - inject()
| result |
| s[d[100].i,d[300].i,d[1].i,d[3].i] |

@GraphComputerVerificationInjectionNotSupported @GremlinLangScriptOnly
@GraphComputerVerificationInjectionNotSupported
Scenario: g_injectX1_3_100_300X_setvar
Given the modern graph
And using the parameter xx1 defined as "s[d[100].i,d[300].i,d[1].i,d[3].i]"
Expand All @@ -300,7 +300,7 @@ Feature: Step - inject()
| result |
| s[d[1].i] |

@GraphComputerVerificationInjectionNotSupported @GremlinLangScriptOnly
@GraphComputerVerificationInjectionNotSupported
Scenario: g_injectX1_1X_setvar
Given the modern graph
And using the parameter xx1 defined as "s[d[1].i,d[1].i]"
Expand All @@ -313,7 +313,7 @@ Feature: Step - inject()
| result |
| s[d[1].i] |

@GraphComputerVerificationInjectionNotSupported @GremlinLangScriptOnly
@GraphComputerVerificationInjectionNotSupported
Scenario: g_injectX_set
Given the modern graph
And using the parameter xx1 defined as "s[]"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* 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;

import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Stage;
import io.cucumber.guice.CucumberModules;
import io.cucumber.junit.Cucumber;
import io.cucumber.junit.CucumberOptions;
import org.apache.tinkerpop.gremlin.features.AbstractGuiceFactory;
import org.apache.tinkerpop.gremlin.features.World;
import org.junit.runner.RunWith;

@RunWith(Cucumber.class)
@CucumberOptions(
tags = "not @RemoteOnly and not @GraphComputerOnly and not @AllowNullPropertyValues",
glue = { "org.apache.tinkerpop.gremlin.features" },
objectFactory = TinkerGraphParameterizedFeatureTest.TinkerGraphGuiceFactory.class,
features = { "classpath:/org/apache/tinkerpop/gremlin/test/features" },
plugin = {"progress", "junit:target/cucumber.xml"})
public class TinkerGraphParameterizedFeatureTest {

public static class TinkerGraphGuiceFactory extends AbstractGuiceFactory {
public TinkerGraphGuiceFactory() {
super(Guice.createInjector(Stage.PRODUCTION, CucumberModules.createScenarioModule(), new ServiceModule()));
}
}

public static final class ServiceModule extends AbstractModule {
@Override
protected void configure() {
bind(World.class).to(TinkerWorld.TinkerGraphParameterizedWorld.class);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ else if (graphData == LoadGraphWith.GraphData.GRATEFUL)
public AbstractTinkerGraph open(final Configuration configuration) {
return TinkerGraph.open(configuration);
}
}

public static class TinkerGraphParameterizedWorld extends TinkerGraphWorld {
@Override
public boolean useParametersLiterally() {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,6 @@ public void testPlay9() throws Exception {
}

@Test
@Ignore
public void testPlay6() throws Exception {
final Graph graph = TinkerGraph.open();
final GraphTraversalSource g = graph.traversal();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphFeatureTest$TinkerGraphGuiceFactory
org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphParameterizedFeatureTest$TinkerGraphGuiceFactory
org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphComputerFeatureTest$TinkerGraphGuiceFactory
org.apache.tinkerpop.gremlin.tinkergraph.TinkerGraphAllowNullFeatureTest$TinkerGraphGuiceFactory
org.apache.tinkerpop.gremlin.tinkergraph.TinkerTransactionGraphFeatureTest$TinkerGraphGuiceFactory
Expand Down

0 comments on commit 66e7e6f

Please sign in to comment.