use of com.baidu.hugegraph.backend.query.Query in project incubator-hugegraph by apache.
the class VertexCoreTest method testQueryAllWithLimitByQueryVertices.
@Test
public void testQueryAllWithLimitByQueryVertices() {
HugeGraph graph = graph();
this.init10VerticesAndCommit();
Query query = new Query(HugeType.VERTEX);
query.limit(1);
Iterator<Vertex> iter = graph.vertices(query);
List<Vertex> vertices = IteratorUtils.list(iter);
Assert.assertEquals(1, vertices.size());
CloseableIterator.closeIterator(iter);
}
Aggregations