Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
Change-Id: Ie442cfb0355f36398422ae0616f4c5bce99cc79f
  • Loading branch information
javeme committed Jan 20, 2022
1 parent e7359fa commit d082f2d
Showing 1 changed file with 30 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3581,12 +3581,12 @@ public void testQueryOutEdgesOfVertexBySortkeyWithRange() {
Assert.assertEquals(3, edges.size());

edges = graph.traversal().V(v1).outE("call")
.has("calltime", P.between("2017-5-2","2017-5-4"))
.has("calltime", P.between("2017-5-2", "2017-5-4"))
.toList();
Assert.assertEquals(5, edges.size());

edges = graph.traversal().V(v1).outE("call")
.has("calltime", P.between("2017-5-2","2017-5-4"))
.has("calltime", P.between("2017-5-2", "2017-5-4"))
.where(__.not(__.otherV().hasId((v10086.id()))))
.toList();
Assert.assertEquals(3, edges.size());
Expand Down Expand Up @@ -4549,6 +4549,33 @@ public void testQueryInEdgesOfVertexByLabelAndFilter() {
Assert.assertEquals(1, edges.size());
}

@Test
public void testQueryInEdgesOfVertexByLabels() {
HugeGraph graph = graph();
init18Edges();

long size;
size = graph.traversal().V().outE("created", "authored", "look")
.hasLabel("authored", "created")
.count().next();
Assert.assertEquals(5L, size);

size = graph.traversal().V().outE("created", "authored", "look")
.hasLabel("authored", "friend")
.count().next();
Assert.assertEquals(3L, size);

size = graph.traversal().V().outE("created")
.hasLabel("authored", "created")
.count().next();
Assert.assertEquals(2L, size);

size = graph.traversal().V().inE("created", "authored", "look")
.has("score", 3)
.count().next();
Assert.assertEquals(3L, size);
}

@Test
public void testQueryInEdgesOfVertexBySortkey() {
HugeGraph graph = graph();
Expand Down Expand Up @@ -7242,7 +7269,7 @@ public void testAddEdgeWithCollectionIndex() {


List<Edge> edges = graph.traversal().E()
.has("related","tags",
.has("related", "tags",
ConditionP.contains("gremlin"))
.toList();

Expand Down

0 comments on commit d082f2d

Please sign in to comment.