Running Tinkerpop test in Janusgraph repo

Hi I'm trying to run the below Tinkerpop test to test out some of the changes I've made to Janusgraph. By copying the test over from Tinkerpop repo into Janusgraph repo (just for testing one test).
@RunWith(Parameterized.class)
public class TraversalInterruptionTest extends AbstractGremlinProcessTest {
private static final Logger logger = LoggerFactory.getLogger(TraversalInterruptionTest.class);

@Parameterized.Parameters(name = "expectInterruption({0})")
public static Iterable<Object[]> data() {
return Arrays.asList(new Object[][]{
// ...
});
}

@Parameterized.Parameter(value = 0)
public String name;

@Parameterized.Parameter(value = 1)
public Function<GraphTraversalSource,GraphTraversal<?,?>> traversalBeforePause;

@Parameterized.Parameter(value = 2)
public UnaryOperator<GraphTraversal<?,?>> traversalAfterPause;

@Test
@LoadGraphWith(GRATEFUL)
public void shouldRespectThreadInterruptionInVertexStep() throws Exception {
// ...
}
}
@RunWith(Parameterized.class)
public class TraversalInterruptionTest extends AbstractGremlinProcessTest {
private static final Logger logger = LoggerFactory.getLogger(TraversalInterruptionTest.class);

@Parameterized.Parameters(name = "expectInterruption({0})")
public static Iterable<Object[]> data() {
return Arrays.asList(new Object[][]{
// ...
});
}

@Parameterized.Parameter(value = 0)
public String name;

@Parameterized.Parameter(value = 1)
public Function<GraphTraversalSource,GraphTraversal<?,?>> traversalBeforePause;

@Parameterized.Parameter(value = 2)
public UnaryOperator<GraphTraversal<?,?>> traversalAfterPause;

@Test
@LoadGraphWith(GRATEFUL)
public void shouldRespectThreadInterruptionInVertexStep() throws Exception {
// ...
}
}
But I'm getting
java.lang.NullPointerException: Cannot invoke "org.apache.tinkerpop.gremlin.GraphProvider.getStaticFeatures()" because "this.innerGraphProvider" is null
java.lang.NullPointerException: Cannot invoke "org.apache.tinkerpop.gremlin.GraphProvider.getStaticFeatures()" because "this.innerGraphProvider" is null
I need to be able to inject the graph implementation into this test somehow? How can I do that? Thank you.
Solution:
You should copy the test suite definition test
tien
tien•16d ago
This workflow was suggested by @Boxuan Li btw. So would be great if you already know the answer 😄
Bo
Bo•16d ago
Oh nope you don't need to copy this test
Solution
Bo
Bo•16d ago
You should copy the test suite definition test
Bo
Bo•16d ago
Search in the TinkerPop repository, there should be a mention of TraversalInterruptionTest .class
tien
tien•16d ago
I've got this now
java.lang.Exception: The ProcessStandardSuite will not run for this Graph until it is publicly acknowledged with the @OptIn annotation on the Graph instance itself
java.lang.Exception: The ProcessStandardSuite will not run for this Graph until it is publicly acknowledged with the @OptIn annotation on the Graph instance itself
Oh I've got it
Bo
Bo•16d ago
Sorry let me rephrase my words. Let's say you want to debug TraversalInterruptionTest in JanusGraph. 1. Open JanusGraph repo in your IDE. 2. Find BerkeleyJanusGraphProcessTest - see how it mentions ProcessStandardSuite 3. Open ProcessStandardSuite (either from TinkerPop repo or from your current IDE window directly) 4. Copy it to JanusGraph repo 5. Remove other tests other than TraversalInterruptionTest
tien
tien•16d ago
Thanks for this, I was able to run the test successfully 💪
Want results from more Discord servers?
Add your server
More Posts
configure gremlin-server to use remote Neptune server?Hello, I’m wondering if it is possible to configure gremlin server to use the graph at remote NeptunQuery optimisationHey, I'm optimising some queries, and found that these 2 seemingly identical queries behave very difCombine two queries to perform only onecan someone help me figureout how I can combine those two queries? groups = f"g.V().hasLabel('Groupcompatibility with Apache Jena FusekiHello! I am new in the community and trying to figure out whether TinkerPop and Gremlin is supportedIs the first traversal pattern evaluated by Match well definedHi, It seems to me that if the match step is able to dynamically select the first traversal pattern.mergeV() with Javascript not workingHi, I have a nodeJS 18 lambda which is closely modeled after this documentation: https://docs.aws.amUnable to deserialize results with Gremlin-go client + JanusGraphHi all - I'm trying to set up a JanusGraph database and use the Gremlin-go client to run some gremliFulltext-search-like features without ElasticSearch, OpenSearch, Solr and such?I've read in multiple sources that Apache TinkerPop isn't optimized for text search operations like Conditionally updating a variable with choose()How do I create and update a variable with a conditional? I need a number to be calculated based on Systems Analysis Report on Apache TinkerPop - Where to Start?Hey all, I'm currently writing an alaysis on Apache TinkerPop for grad school and was just hoping thLambda example in TypeScriptDoes anyone know where I can find example code that demonstrates up-to-date best practices for writimergeE(): increment counter on matchHi, is there an easy way to increment an existing edge property based on its current value using `meSerialization IssueI have a weird error, when I am connecting with JanusGraph gremlin client using `conf/remote-graph-Design decision related to multiple heterogenous relational graphsI'm working with over 100k instances of heterogeneous, relational node-and-edge attributed graphs, eStackoverflow when adding a larger list of property values using traverser.property()Hey, we encounter a stack overflow: ``` Exception during Transaction, rolling back ... org.apache.tijava: package org.apache.tinkerpop.shaded.jackson.core does not existWhile trying to `mvn clean install` with jdk11, I ran into the above error using the master branch. Performance issue in large graphsWhen performing changes in large graph (ca. 100K nodes, 500K edges) which is stored in one kryo fileConcurrent queries to authentication required sever resulted in 401 errorHey guys, playing around with gremlin & encountered this very odd error where concurrent queries wilDiscrepancy between console server id conventions and NeptuneSo I'm working with my test server and on Neptune--and I'm noticing a difference in the type of the how to connect the amothic/neptune container to the volume?I need to know which directory needs to attach to containeer. so that the data is stored safely. eve