From 22aa44c0b499fb2323ecf185405e21936cb7b4c5 Mon Sep 17 00:00:00 2001 From: Gemma Lamont Date: Wed, 8 Jan 2025 08:52:16 +0100 Subject: [PATCH] PR updates --- core/src/main/java/apoc/cypher/Timeboxed.java | 8 ++------ core/src/test/resources/procedures/common/procedures.json | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/apoc/cypher/Timeboxed.java b/core/src/main/java/apoc/cypher/Timeboxed.java index fe6296f7d..099573a53 100644 --- a/core/src/main/java/apoc/cypher/Timeboxed.java +++ b/core/src/main/java/apoc/cypher/Timeboxed.java @@ -70,7 +70,8 @@ public Stream runTimeboxed( @Name(value = "statement", description = "The Cypher statement to run.") String cypher, @Name(value = "params", description = "The parameters for the given Cypher statement.") Map params, - @Name(value = "timeout", description = "The maximum time the statement can run for.") long timeout, + @Name(value = "timeout", description = "The maximum time, in milliseconds, the statement can run for.") + long timeout, @Name( value = "config", defaultValue = "{}", @@ -83,11 +84,6 @@ public Stream runTimeboxed( boolean failOnError = toBoolean(config.get("failOnError")); boolean appendStatusRow = toBoolean(config.get("appendStatusRow")); - // Check the query is valid before trying to run it - if (failOnError) { - Util.validateQuery(db, cypher); - } - // run query to be timeboxed in a separate thread to enable proper tx termination // if we'd run this in current thread, a tx.terminate would kill the transaction the procedure call uses itself. pools.getDefaultExecutorService().submit(() -> { diff --git a/core/src/test/resources/procedures/common/procedures.json b/core/src/test/resources/procedures/common/procedures.json index bcb48102a..8c48f48f9 100644 --- a/core/src/test/resources/procedures/common/procedures.json +++ b/core/src/test/resources/procedures/common/procedures.json @@ -1794,7 +1794,7 @@ "type" : "MAP" }, { "name" : "timeout", - "description" : "The maximum time the statement can run for.", + "description" : "The maximum time, in milliseconds, the statement can run for.", "isDeprecated" : false, "type" : "INTEGER" },