Skip to content

Commit 26103f3

Browse files
committed
Fix styling and test failures
1 parent 9b5fec2 commit 26103f3

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
@@ -268,6 +268,21 @@ void createCypherProjectionWithParameters() {
268268
assertGraphExists(graphName);
269269
}
270270

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

0 commit comments

Comments
 (0)