Skip to content

Commit

Permalink
[NOID] code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
vga91 committed Mar 8, 2024
1 parent f27870d commit 36b817c
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,22 +201,21 @@ public void testCypherMapParallelWithResults() {

@Test
public void testCypherMapParallel2WithResults() {
// this test could cause flaky errors,
// this test could cause flaky errors,
// so we need to run the query several times to make sure it always works
for (int i = 0; i < 30; i++) {
String query = "MATCH (n:ReturnQuery) WITH COLLECT(n) AS list\n" +
"CALL apoc.cypher.mapParallel2('MATCH (_)-[r:REL]->(o:Other) RETURN r, o', {}, list, 1)\n" +
"YIELD value RETURN value";
String query = "MATCH (n:ReturnQuery) WITH COLLECT(n) AS list\n"
+ "CALL apoc.cypher.mapParallel2('MATCH (_)-[r:REL]->(o:Other) RETURN r, o', {}, list, 1)\n"
+ "YIELD value RETURN value";
Map<String, Object> params = Map.of("file", SIMPLE_RETURN_QUERIES);
testCypherMapParallelCommon(query, params);

session.writeTransaction(tx -> tx.run("MATCH (n) DETACH DELETE n"));
}

// Check that `SHOW TRANSACTIONS` just returns itself
// Check that `SHOW TRANSACTIONS` just returns itself
String showTransactionsQuery = "SHOW TRANSACTIONS";
testCall(session, showTransactionsQuery,
r -> assertEquals(showTransactionsQuery, r.get("currentQuery")));
testCall(session, showTransactionsQuery, r -> assertEquals(showTransactionsQuery, r.get("currentQuery")));
}

private void testCypherMapParallelCommon(String query, Map<String, Object> params) {
Expand Down

0 comments on commit 36b817c

Please sign in to comment.