From 444df6ec3bb675b82e4311bfc1e275fa573e188f Mon Sep 17 00:00:00 2001 From: BingqingLyu Date: Thu, 16 Nov 2023 20:09:50 +0800 Subject: [PATCH] [CI Tests] add ci test --- .../suite/pattern/PatternQueryTest.java | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/gremlin/integration/suite/pattern/PatternQueryTest.java b/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/gremlin/integration/suite/pattern/PatternQueryTest.java index d6578865b045..6f24cc46a240 100644 --- a/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/gremlin/integration/suite/pattern/PatternQueryTest.java +++ b/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/gremlin/integration/suite/pattern/PatternQueryTest.java @@ -58,6 +58,8 @@ public abstract class PatternQueryTest extends AbstractGremlinProcessTest { public abstract Traversal get_pattern_16_test(); + public abstract Traversal get_pattern_17_test(); + @Test public void run_pattern_1_test() { Traversal traversal = this.get_pattern_1_test(); @@ -170,6 +172,13 @@ public void run_pattern_16_test() { Assert.assertEquals(23286L, traversal.next().longValue()); } + @Test + public void run_pattern_17_test() { + Traversal traversal = this.get_pattern_17_test(); + this.printTraversalForm(traversal); + Assert.assertEquals(17367L, traversal.next().longValue()); + } + public static class Traversals extends PatternQueryTest { // PM1 @@ -356,5 +365,26 @@ public Traversal get_pattern_16_test() { .by("firstName") .count(); } + + @Override + public Traversal 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(); + } } }