Skip to content

Commit b0da77d

Browse files
committed
fixed tests for ArangoDB 3.10
1 parent 787c2c3 commit b0da77d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/test/java/com/arangodb/async/example/graph/AQLActorsAndMoviesExample.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ private static void createData() throws InterruptedException, ExecutionException
314314
@Test
315315
public void allActorsActsInMovie1or2() throws InterruptedException, ExecutionException {
316316
final CompletableFuture<ArangoCursorAsync<String>> f = db.query(
317-
"WITH actors FOR x IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN x._id",
317+
"WITH actors, movies FOR x IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN x._id",
318318
null, null, String.class);
319319
f.whenComplete((cursor, ex) -> assertThat(cursor.asListRemaining(),
320320
hasItems("actors/Keanu", "actors/Hugo", "actors/Emil", "actors/Carrie", "actors/Laurence"))).get();
@@ -330,7 +330,7 @@ public void allActorsActsInMovie1or2() throws InterruptedException, ExecutionExc
330330
@Test
331331
public void allActorsActsInMovie1or2UnionDistinct() throws InterruptedException, ExecutionException {
332332
final CompletableFuture<ArangoCursorAsync<String>> f = db.query(
333-
"WITH actors FOR x IN UNION_DISTINCT ((FOR y IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'movies/TheDevilsAdvocate' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
333+
"WITH actors, movies FOR x IN UNION_DISTINCT ((FOR y IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'movies/TheDevilsAdvocate' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
334334
null, null, String.class);
335335
f.whenComplete((cursor, ex) -> assertThat(cursor.asListRemaining(), hasItems("actors/Emil", "actors/Hugo", "actors/Carrie",
336336
"actors/Laurence", "actors/Keanu", "actors/Al", "actors/Charlize"))).get();
@@ -346,7 +346,7 @@ public void allActorsActsInMovie1or2UnionDistinct() throws InterruptedException,
346346
@Test
347347
public void allActorsActsInMovie1and2() throws InterruptedException, ExecutionException {
348348
final CompletableFuture<ArangoCursorAsync<String>> f = db.query(
349-
"WITH actors FOR x IN INTERSECTION ((FOR y IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'movies/TheDevilsAdvocate' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
349+
"WITH actors, movies FOR x IN INTERSECTION ((FOR y IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'movies/TheDevilsAdvocate' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
350350
null, null, String.class);
351351
f.whenComplete((cursor, ex) -> assertThat(cursor.asListRemaining(), hasItems("actors/Keanu"))).get();
352352
}
@@ -361,7 +361,7 @@ public void allActorsActsInMovie1and2() throws InterruptedException, ExecutionEx
361361
@Test
362362
public void allMoviesBetweenActor1andActor2() throws InterruptedException, ExecutionException {
363363
final CompletableFuture<ArangoCursorAsync<String>> f = db.query(
364-
"WITH movies FOR x IN INTERSECTION ((FOR y IN ANY 'actors/Hugo' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'actors/Keanu' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
364+
"WITH actors, movies FOR x IN INTERSECTION ((FOR y IN ANY 'actors/Hugo' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'actors/Keanu' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
365365
null, null, String.class);
366366
f.whenComplete((cursor, ex) -> assertThat(cursor.asListRemaining(),
367367
hasItems("movies/TheMatrixRevolutions", "movies/TheMatrixReloaded", "movies/TheMatrix"))).get();

src/test/java/com/arangodb/example/graph/AQLActorsAndMoviesExample.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static void tearDown() {
7171
@Test
7272
public void allActorsActsInMovie1or2() {
7373
final ArangoCursor<String> cursor = db.query(
74-
"WITH actors FOR x IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN x._id",
74+
"WITH actors, movies FOR x IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN x._id",
7575
null, null, String.class);
7676
assertThat(cursor.asListRemaining(),
7777
hasItems("actors/Keanu", "actors/Hugo", "actors/Emil", "actors/Carrie", "actors/Laurence"));
@@ -85,7 +85,7 @@ public void allActorsActsInMovie1or2() {
8585
@Test
8686
public void allActorsActsInMovie1or2UnionDistinct() {
8787
final ArangoCursor<String> cursor = db.query(
88-
"WITH actors FOR x IN UNION_DISTINCT ((FOR y IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'movies/TheDevilsAdvocate' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
88+
"WITH actors, movies FOR x IN UNION_DISTINCT ((FOR y IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'movies/TheDevilsAdvocate' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
8989
null, null, String.class);
9090
assertThat(cursor.asListRemaining(), hasItems("actors/Emil", "actors/Hugo", "actors/Carrie", "actors/Laurence",
9191
"actors/Keanu", "actors/Al", "actors/Charlize"));
@@ -99,7 +99,7 @@ public void allActorsActsInMovie1or2UnionDistinct() {
9999
@Test
100100
public void allActorsActsInMovie1and2() {
101101
final ArangoCursor<String> cursor = db.query(
102-
"WITH actors FOR x IN INTERSECTION ((FOR y IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'movies/TheDevilsAdvocate' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
102+
"WITH actors, movies FOR x IN INTERSECTION ((FOR y IN ANY 'movies/TheMatrix' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'movies/TheDevilsAdvocate' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
103103
null, null, String.class);
104104
assertThat(cursor.asListRemaining(), hasItems("actors/Keanu"));
105105
}
@@ -112,7 +112,7 @@ public void allActorsActsInMovie1and2() {
112112
@Test
113113
public void allMoviesBetweenActor1andActor2() {
114114
final ArangoCursor<String> cursor = db.query(
115-
"WITH movies FOR x IN INTERSECTION ((FOR y IN ANY 'actors/Hugo' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'actors/Keanu' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
115+
"WITH actors, movies FOR x IN INTERSECTION ((FOR y IN ANY 'actors/Hugo' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id), (FOR y IN ANY 'actors/Keanu' actsIn OPTIONS {bfs: true, uniqueVertices: 'global'} RETURN y._id)) RETURN x",
116116
null, null, String.class);
117117
assertThat(cursor.asListRemaining(),
118118
hasItems("movies/TheMatrixRevolutions", "movies/TheMatrixReloaded", "movies/TheMatrix"));

0 commit comments

Comments
 (0)