Skip to content

Commit 8768cec

Browse files
committed
Fix styling and test failures
1 parent 1edbf6c commit 8768cec

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

proc/catalog/src/test/java/org/neo4j/gds/catalog/GraphProjectProcTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,21 @@ void createCypherProjectionWithParameters() {
271271
assertGraphExists(graphName);
272272
}
273273

274+
275+
@Test
276+
void cypherProjectionShouldFailOnInvalidRelationships() {
277+
var query = "CALL gds.graph.project.cypher(" +
278+
" 'g'," +
279+
" 'UNWIND [1,2,3] as i RETURN i as id'," +
280+
" 'UNWIND [1,2,3] as i return i as source, i+1 as target'" +
281+
")";
282+
283+
assertThatThrownBy(() -> runQuery(query))
284+
.rootCause()
285+
.isInstanceOf(IllegalArgumentException.class)
286+
.hasMessageContaining("Failed to load a relationship because its target-node");
287+
}
288+
274289
@Test
275290
void nodeProjectionWithAsterisk() {
276291
String query = "CALL gds.graph.project('g', '*', 'REL') YIELD nodeCount";

0 commit comments

Comments
 (0)