I am trying to use the provided Elasticsearch java test framework to do some integration testing on my es project. I have a very simple test setup in IntelliJ:
class FormTest : ESIntegTestCase() {
override fun nodeSettings(nodeOrdinal: Int): Settings = Settings.builder()
.put(super.nodeSettings(nodeOrdinal))
//.put("node.mode", "network")
.build()
@org.junit.Test fun start() {
ensureGreen()
}
}
However, when I run this, I get the following exception:
java.lang.RuntimeException: found jar hell in test classpath
at org.elasticsearch.bootstrap.BootstrapForTesting.<clinit>(BootstrapForTesting.java:92)
at org.elasticsearch.test.ESTestCase.<clinit>(ESTestCase.java:190)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.carrotsearch.randomizedtesting.RandomizedRunner$2.run(RandomizedRunner.java:592)
Caused by: java.lang.IllegalStateException: jar hell!
duplicate jar [C:\Users\user\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\181.5281.24\lib\idea_rt.jar] on classpath: ...
at org.elasticsearch.bootstrap.JarHell.parseClassPath(JarHell.java:142)
at org.elasticsearch.bootstrap.JarHell.parseClassPath(JarHell.java:98)
at org.elasticsearch.bootstrap.JarHell.checkJarHell(JarHell.java:89)
at org.elasticsearch.bootstrap.BootstrapForTesting.<clinit>(BootstrapForTesting.java:90)
... 4 more
I found some ways to bypass the jar hell check, but how to solve the issue?