From 4d5a59d514bb2d0d9bfdaedb9feee30eec7f93b2 Mon Sep 17 00:00:00 2001 From: Mark Needham Date: Sun, 7 Oct 2018 11:42:15 +0100 Subject: [PATCH] fixing weird cypher error --- .../java/org/neo4j/graphalgo/core/RandomGraphTestCase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/test/java/org/neo4j/graphalgo/core/RandomGraphTestCase.java b/tests/src/test/java/org/neo4j/graphalgo/core/RandomGraphTestCase.java index eba60bdd1..97e6d8abd 100644 --- a/tests/src/test/java/org/neo4j/graphalgo/core/RandomGraphTestCase.java +++ b/tests/src/test/java/org/neo4j/graphalgo/core/RandomGraphTestCase.java @@ -55,7 +55,7 @@ protected void failed( private static final String RANDOM_GRAPH_TPL = "FOREACH (x IN range(1, %d) | CREATE (:Label)) " + "WITH 0.1 AS p " + - "MATCH (n1),(n2) WITH n1,n2 LIMIT 1000 WHERE rand() < p " + + "MATCH (n1),(n2) WITH n1,n2,p LIMIT 1000 WHERE rand() < p " + "CREATE (n1)-[:TYPE {weight:ceil(10*rand())/10}]->(n2)"; private static final String RANDOM_LABELS = @@ -88,7 +88,7 @@ static GraphDatabaseAPI buildGraph(int nodeCount) { final GraphDatabaseService db = TestDatabaseCreator.createTestDatabase(); for (String cypher : cyphers) { try (Transaction tx = db.beginTx()) { - db.execute(cypher).close(); + db.execute(cypher).close(); tx.success(); } catch (Exception e) { markFailure();