We're having issues with our Elasticsearch topology. We're using default topology which behaves not so good when under heavy load, which is happening in the last few weeks.
So we wanted to automatically cancel long running tasks as a safety net to other things we're doing.
To test this cancelation, we need to simulate long running queries. Is there any chance to do this? Of course, this will be done only locally or on dev environment/
I thought there is something like Thread.sleep in script, but I don't see such feature in painless. I found one article that does that in groovy, but no luck in painless.
Thanks in advance