Skip to content

Commit

Permalink
[CI Tests] add ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
BingqingLyu committed Nov 16, 2023
1 parent 81a081f commit 444df6e
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ public abstract class PatternQueryTest extends AbstractGremlinProcessTest {

public abstract Traversal<Vertex, Long> get_pattern_16_test();

public abstract Traversal<Vertex, Long> get_pattern_17_test();

@Test
public void run_pattern_1_test() {
Traversal<Vertex, Long> traversal = this.get_pattern_1_test();
Expand Down Expand Up @@ -170,6 +172,13 @@ public void run_pattern_16_test() {
Assert.assertEquals(23286L, traversal.next().longValue());
}

@Test
public void run_pattern_17_test() {
Traversal<Vertex, Long> traversal = this.get_pattern_17_test();
this.printTraversalForm(traversal);
Assert.assertEquals(17367L, traversal.next().longValue());
}

public static class Traversals extends PatternQueryTest {

// PM1
Expand Down Expand Up @@ -356,5 +365,26 @@ public Traversal<Vertex, Long> get_pattern_16_test() {
.by("firstName")
.count();
}

@Override
public Traversal<Vertex, Long> get_pattern_17_test() {
return g.V().match(
__.as("a")
.hasLabel("PERSON")
.out("HASINTEREST")
.hasLabel("TAG")
.as("b"),
__.as("a")
.hasLabel("PERSON")
.in("HASCREATOR")
.hasLabel("COMMENT", "POST")
.as("c"),
__.as("c")
.hasLabel("COMMENT", "POST")
.out("HASTAG")
.hasLabel("TAG")
.as("b"))
.count();
}
}
}

0 comments on commit 444df6e

Please sign in to comment.