Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
fixing weird cypher error
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Needham committed Oct 7, 2018
1 parent 7d51b55 commit 4d5a59d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 4d5a59d

Please sign in to comment.