Skip to content

Commit b501a5c

Browse files
committed
[DE-377] test support for enterprise graphs
(cherry picked from commit b926685)
1 parent 389590e commit b501a5c

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/test/java/com/arangodb/ArangoGraphTest.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,28 @@ void hybridDisjointSmartGraph(ArangoDatabase db) {
385385
assertThat(db.collection(v2Name).getProperties().getReplicationFactor().getValue()).isEqualTo(2);
386386
}
387387

388+
@ParameterizedTest(name = "{index}")
389+
@MethodSource("dbs")
390+
void enterpriseGraph(ArangoDatabase db) {
391+
assumeTrue(isEnterprise());
392+
assumeTrue(isCluster());
393+
394+
final Collection<EdgeDefinition> edgeDefinitions = new ArrayList<>();
395+
edgeDefinitions.add(new EdgeDefinition().collection("enterpriseGraph-edge-" + rnd()).from("enterpriseGraph-vertex-" + rnd()).to("enterpriseGraph-vertex-" + rnd()));
396+
397+
String graphId = GRAPH_NAME + rnd();
398+
final GraphEntity g = db.createGraph(graphId, edgeDefinitions, new GraphCreateOptions().isSmart(true).numberOfShards(2));
399+
400+
assertThat(g).isNotNull();
401+
assertThat(g.getSmartGraphAttribute()).isNull();
402+
assertThat(g.getNumberOfShards()).isEqualTo(2);
403+
if (isAtLeastVersion(3, 10)) {
404+
assertThat(g.getIsSmart()).isTrue();
405+
} else {
406+
assertThat(g.getIsSmart()).isFalse();
407+
}
408+
}
409+
388410
@ParameterizedTest(name = "{index}")
389411
@MethodSource("dbs")
390412
void drop(ArangoDatabase db) {

0 commit comments

Comments
 (0)