From cce109a1392e83257428197c0a299b640e406862 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 | 7 +------ core/src/test/resources/procedures/common/procedures.json | 2 +- 2 files changed, 2 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..8393ca25b 100644 --- a/core/src/main/java/apoc/cypher/Timeboxed.java +++ b/core/src/main/java/apoc/cypher/Timeboxed.java @@ -70,7 +70,7 @@ 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 +83,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" },