We want to create a very slow query to test it in our application. Is there any way to make a Neo4j query last for a specific amount of seconds?
I believe you can use the APOC procedure apoc.util.sleep.
According the docs:
apoc.util.sleep({duration})
: sleeps for millis, transaction termination is honored
For example:
CALL apoc.util.sleep(1000) // wait for 1 second
MATCH (node) // match 'node'...
RETURN node // ... return 'node'
Please remember to install APOC procedures according the version of Neo4j you are using. Take a look in the Version Compatibility Matrix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With