kotest / kotest-intellij-plugin

The official Kotest plugin for Intellij and Android Studio
Apache License 2.0
179 stars 25 forks source link

Starting an individual test fails with java.lang.NoClassDefFoundError: io/kotest/common/ConcurrentHashMapKt #272

Closed Spikhalskiy closed 1 year ago

Spikhalskiy commented 1 year ago

When trying to run an individual context or a should node of ShouldSpec Idea, I'm getting "Test framework quit unexpectedly" with

Exception in thread "main" java.lang.NoClassDefFoundError: io/kotest/common/ConcurrentHashMapKt
    at io.kotest.engine.listener.CollectingTestEngineListener.<init>(CollectingTestEngineListener.kt:11)
    at io.kotest.engine.launcher.MainKt.main(main.kt:25)
Caused by: java.lang.ClassNotFoundException: io.kotest.common.ConcurrentHashMapKt
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
    ... 2 more

Running the whole spec works fine.

The problem is present with both "Run tests using: Gradle (Default)" and "Run tests using: IntelliJ Idea"

Spikhalskiy commented 1 year ago

Caused by a mix of kotest 5.6.2 and 5.7.2 in our test classpath