Integration tests fail with

I'm trying to run integration tests with Elasticsearch 5 by extending ESIntegTestCase in my class. However, it always fails with access denied ("java.lang.RuntimePermission" "setDefaultUncaughtExceptionHandler"), no matter what I try.

I have tried to set ES_JAVA_OPTS="" and ES_JAVA_OPTS="". The file contains:
grant {
permission java.lang.RuntimePermission "setDefaultUncaughtExceptionHandler";
permission org.elasticsearch.ThreadPermission "modifyArbitraryThreadGroup";
}; asks to put plugin-security.policy in src/main/plugin-metadata, which I did, but I use Maven and the file does not get picked up, I guess. I could use Gradle as well if needed, but it's not clear what "Gradle build system" is and how to get that in my project?

I also tried to run the integration tests following the instructions in, but no luck.

How can I get testing work?

Replying to myself: I got it solved by including <argLine></argLine> in randomizedtesting maven plugin configuration. Not sure why the policy file is not picked up, though.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.