kotest / kotest-intellij-plugin

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

Glutter icon not working #116

Open khongi opened 3 years ago

khongi commented 3 years ago

When I try to run a single test with glutter icon of BehaviorSpec, Given The run fails with the following log:

kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath
    at kotlin.jvm.internal.ClassReference.error(ClassReference.kt:84)
    at kotlin.jvm.internal.ClassReference.getAnnotations(ClassReference.kt:27)
    at io.kotest.mpp.JvmReflection.annotations(reflection.kt:15)
    at io.kotest.core.spec.DescriptionKt.toDescription(description.kt:24)
    at io.kotest.engine.launcher.TestPathTestCaseFilter.<init>(TestPathTestCaseFilter.kt:22)
    at io.kotest.engine.launcher.ExecuteKt$execute$1.invokeSuspend(execute.kt:40)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115)
    at io.kotest.engine.launcher.ExecuteKt.future(execute.kt:89)
    at io.kotest.engine.launcher.ExecuteKt.execute(execute.kt:34)
    at io.kotest.engine.launcher.MainKt.main(main.kt:12)

Process finished with exit code 0

[kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath]

However when I run the whole test class using the glutter icon, it works as excepted. I encountered this while writing tests on:

Android Studio Arctic Fox | 2020.3.1 Canary 2
Build #AI-202.7319.50.2031.7006259, built on December 2, 2020
Runtime version: 11.0.8+0-b944-P17168821 amd64
VM: OpenJDK 64-Bit Server VM by N/A
Linux 5.4.80-2-manjaro
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 8
Registry: external.system.auto.import.disabled=true
Non-Bundled Plugins: IdeaVIM, com.vermouthx.idea, idea.plugin.protoeditor, some.awesome, org.jetbrains.kotlin, zielu.gittoolbox, com.developerphil.adbidea, kotest-plugin-intellij, izhangzhihao.rainbow.brackets
Current Desktop: GNOME
sksamuel commented 3 years ago

Can you add kotlin- reflect to your classpath

On Mon, 14 Dec 2020, 12:53 Khongor Bayarsaikhan, notifications@github.com wrote:

When I try to run a single test with glutter icon, the run fails with the following log:

kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath at kotlin.jvm.internal.ClassReference.error(ClassReference.kt:84) at kotlin.jvm.internal.ClassReference.getAnnotations(ClassReference.kt:27) at io.kotest.mpp.JvmReflection.annotations(reflection.kt:15) at io.kotest.core.spec.DescriptionKt.toDescription(description.kt:24) at io.kotest.engine.launcher.TestPathTestCaseFilter.(TestPathTestCaseFilter.kt:22) at io.kotest.engine.launcher.ExecuteKt$execute$1.invokeSuspend(execute.kt:40) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlin.coroutines.ContinuationKt.startCoroutine(Continuation.kt:115) at io.kotest.engine.launcher.ExecuteKt.future(execute.kt:89) at io.kotest.engine.launcher.ExecuteKt.execute(execute.kt:34) at io.kotest.engine.launcher.MainKt.main(main.kt:12)

Process finished with exit code 0

[kotlin.jvm.KotlinReflectionNotSupportedError: Kotlin reflection implementation is not found at runtime. Make sure you have kotlin-reflect.jar in the classpath]

However when I run the whole test class using the glutter icon, it works as excepted. I encountered this while writing tests on:

Android Studio Arctic Fox | 2020.3.1 Canary 2 Build #AI-202.7319.50.2031.7006259, built on December 2, 2020 Runtime version: 11.0.8+0-b944-P17168821 amd64 VM: OpenJDK 64-Bit Server VM by N/A Linux 5.4.80-2-manjaro GC: G1 Young Generation, G1 Old Generation Memory: 4096M Cores: 8 Registry: external.system.auto.import.disabled=true Non-Bundled Plugins: IdeaVIM, com.vermouthx.idea, idea.plugin.protoeditor, some.awesome, org.jetbrains.kotlin, zielu.gittoolbox, com.developerphil.adbidea, kotest-plugin-intellij, izhangzhihao.rainbow.brackets Current Desktop: GNOME

  • Kotest Plugin version: 1.1.22-IC-2020.2
  • Kotlin Plugin: 1.4.21-release-Studio4.2-1
  • Kotest 4.3.2
  • Kotlin 1.4.20

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kotest/kotest-intellij-plugin/issues/116, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFVSGTYEUFSUCO2XVMIX7LSUZNJZANCNFSM4U3FVQ2A .

khongi commented 3 years ago

I added kotlin-reflect:1.4.20 and tried again, this time a different exception: (the test still passes if I run the whole test class)

~~~ Kotest Configuration ~~~
-> Parallelization factor: 1
-> Default test timeout: 600000ms
-> Default test order: Sequential
-> Default isolation mode: SingleInstance
-> Global soft assertations: False
-> Write spec failure file: False
-> Fail on ignored tests: False
-> Spec execution order: SpecExecutionOrder
-> Extensions
  - io.kotest.engine.extensions.SystemPropertyTagExtension
  - io.kotest.core.extensions.RuntimeTagExtension
  - io.kotest.engine.extensions.RuntimeTagExpressionExtension
  - io.kotest.engine.extensions.SpecifiedTagsTagExtension

io.kotest.engine.SpecInstantiationException: Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest
    at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:34)
    at io.kotest.engine.InstantiateSpecKt.createAndInitializeSpec(instantiateSpec.kt:21)
    at io.kotest.engine.spec.SpecExecutor.createInstance(SpecExecutor.kt:103)
    at io.kotest.engine.spec.SpecExecutor.execute(SpecExecutor.kt:43)
    at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1$1.invokeSuspend(KotestEngine.kt:139)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
    at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1.run(KotestEngine.kt:138)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
    at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
    at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:32)
    ... 18 more
Caused by: java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory
    at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:184)
    at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)
    at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt:91)
    at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt)
    at io.kotest.core.spec.style.BehaviorSpec.<init>(behaviorSpec.kt:34)
    at com.thiosin.novus.screens.home.HomePresenterTest.<init>(HomePresenterTest.kt:17)
    ... 25 more
Caused by: java.lang.ClassNotFoundException: io.mockk.proxy.MockKAgentFactory
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 31 more
io.kotest.engine.SpecInstantiationException: Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest
    at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:34)
    at io.kotest.engine.InstantiateSpecKt.createAndInitializeSpec(instantiateSpec.kt:21)
    at io.kotest.engine.spec.SpecExecutor.createInstance(SpecExecutor.kt:103)
    at io.kotest.engine.spec.SpecExecutor.execute(SpecExecutor.kt:43)
    at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1$1.invokeSuspend(KotestEngine.kt:139)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
    at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1.run(KotestEngine.kt:138)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
    at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
    at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:32)
    ... 18 more
Caused by: java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory
    at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:184)

    at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)
    at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt:91)
    at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt)
    at io.kotest.core.spec.style.BehaviorSpec.<init>(behaviorSpec.kt:34)
    at com.thiosin.novus.screens.home.HomePresenterTest.<init>(HomePresenterTest.kt:17)
    ... 25 more
Caused by: java.lang.ClassNotFoundException: io.mockk.proxy.MockKAgentFactory
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 31 more

io.kotest.engine.SpecInstantiationException: Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest
    at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:34)
    at io.kotest.engine.InstantiateSpecKt.createAndInitializeSpec(instantiateSpec.kt:21)
    at io.kotest.engine.spec.SpecExecutor.createInstance(SpecExecutor.kt:103)
    at io.kotest.engine.spec.SpecExecutor.execute(SpecExecutor.kt:43)
    at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1$1.invokeSuspend(KotestEngine.kt:139)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
    at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
    at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
    at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
    at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
    at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1.run(KotestEngine.kt:138)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
    at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
    at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:32)
    ... 18 more
Caused by: java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory
    at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:184)
    at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)
    at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt:91)
    at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt)
    at io.kotest.core.spec.style.BehaviorSpec.<init>(behaviorSpec.kt:34)
    at com.thiosin.novus.screens.home.HomePresenterTest.<init>(HomePresenterTest.kt:17)
    ... 25 more
Caused by: java.lang.ClassNotFoundException: io.mockk.proxy.MockKAgentFactory
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
    ... 31 more

Process finished with exit code 255

Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest

image

sksamuel commented 3 years ago

Are you using mockk ?

On Mon, 14 Dec 2020 at 13:10, Khongor Bayarsaikhan notifications@github.com wrote:

I added kotlin-reflect:1.4.20 and tried again, this time a different exception: (the test still passes if I run the whole test class)


-> Parallelization factor: 1
-> Default test timeout: 600000ms
-> Default test order: Sequential
-> Default isolation mode: SingleInstance
-> Global soft assertations: False
-> Write spec failure file: False
-> Fail on ignored tests: False
-> Spec execution order: SpecExecutionOrder
-> Extensions
  - io.kotest.engine.extensions.SystemPropertyTagExtension
  - io.kotest.core.extensions.RuntimeTagExtension
  - io.kotest.engine.extensions.RuntimeTagExpressionExtension
  - io.kotest.engine.extensions.SpecifiedTagsTagExtension

io.kotest.engine.SpecInstantiationException: Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest
  at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:34)
  at io.kotest.engine.InstantiateSpecKt.createAndInitializeSpec(instantiateSpec.kt:21)
  at io.kotest.engine.spec.SpecExecutor.createInstance(SpecExecutor.kt:103)
  at io.kotest.engine.spec.SpecExecutor.execute(SpecExecutor.kt:43)
  at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1$1.invokeSuspend(KotestEngine.kt:139)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
  at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
  at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
  at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
  at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
  at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1.run(KotestEngine.kt:138)
  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
  at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
  at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
  at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:32)
  ... 18 more
Caused by: java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory
  at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:184)
  at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)
  at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt:91)
  at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt)
  at io.kotest.core.spec.style.BehaviorSpec.<init>(behaviorSpec.kt:34)
  at com.thiosin.novus.screens.home.HomePresenterTest.<init>(HomePresenterTest.kt:17)
  ... 25 more
Caused by: java.lang.ClassNotFoundException: io.mockk.proxy.MockKAgentFactory
  at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
  at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
  ... 31 more
io.kotest.engine.SpecInstantiationException: Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest
  at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:34)
  at io.kotest.engine.InstantiateSpecKt.createAndInitializeSpec(instantiateSpec.kt:21)
  at io.kotest.engine.spec.SpecExecutor.createInstance(SpecExecutor.kt:103)
  at io.kotest.engine.spec.SpecExecutor.execute(SpecExecutor.kt:43)
  at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1$1.invokeSuspend(KotestEngine.kt:139)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
  at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
  at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
  at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
  at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
  at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1.run(KotestEngine.kt:138)
  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
  at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
  at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
  at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:32)
  ... 18 more
Caused by: java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory
  at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:184)

  at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)
  at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt:91)
  at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt)
  at io.kotest.core.spec.style.BehaviorSpec.<init>(behaviorSpec.kt:34)
  at com.thiosin.novus.screens.home.HomePresenterTest.<init>(HomePresenterTest.kt:17)
  ... 25 more
Caused by: java.lang.ClassNotFoundException: io.mockk.proxy.MockKAgentFactory
  at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
  at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
  ... 31 more

io.kotest.engine.SpecInstantiationException: Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest
  at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:34)
  at io.kotest.engine.InstantiateSpecKt.createAndInitializeSpec(instantiateSpec.kt:21)
  at io.kotest.engine.spec.SpecExecutor.createInstance(SpecExecutor.kt:103)
  at io.kotest.engine.spec.SpecExecutor.execute(SpecExecutor.kt:43)
  at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1$1.invokeSuspend(KotestEngine.kt:139)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
  at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
  at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
  at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:84)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
  at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
  at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
  at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
  at io.kotest.engine.KotestEngine$submitBatch$$inlined$forEach$lambda$1.run(KotestEngine.kt:138)
  at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
  at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.reflect.InvocationTargetException
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
  at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
  at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
  at kotlin.reflect.jvm.internal.calls.CallerImpl$Constructor.call(CallerImpl.kt:41)
  at kotlin.reflect.jvm.internal.KCallableImpl.call(KCallableImpl.kt:108)
  at io.kotest.engine.InstantiateSpecKt.javaReflectNewInstance(instantiateSpec.kt:32)
  ... 18 more
Caused by: java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory
  at io.mockk.impl.JvmMockKGateway.<init>(JvmMockKGateway.kt:184)
  at io.mockk.impl.JvmMockKGateway.<clinit>(JvmMockKGateway.kt:172)
  at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt:91)
  at com.thiosin.novus.screens.home.HomePresenterTest$1.invoke(HomePresenterTest.kt)
  at io.kotest.core.spec.style.BehaviorSpec.<init>(behaviorSpec.kt:34)
  at com.thiosin.novus.screens.home.HomePresenterTest.<init>(HomePresenterTest.kt:17)
  ... 25 more
Caused by: java.lang.ClassNotFoundException: io.mockk.proxy.MockKAgentFactory
  at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
  at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
  at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
  ... 31 more

Process finished with exit code 255

Could not create instance of class com.thiosin.novus.screens.home.HomePresenterTest

[image: image]
<https://user-images.githubusercontent.com/11983684/102124254-546e1500-3e48-11eb-8357-ac13dceb2fa2.png>

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/kotest/kotest-intellij-plugin/issues/116#issuecomment-744648497>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGQGW7NVURC243RSBCTSUZPJRANCNFSM4U3FVQ2A>
.
khongi commented 3 years ago

yes

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

pawegio commented 3 years ago

It still fails with java.lang.NoClassDefFoundError: io/mockk/proxy/MockKAgentFactory for:

kotest-runner-junit5-jvm: 4.4.3
kotest plugin: 1.1.30-IC-2020.3
mockK: 1.11.0
android studio: Arctic Fox 2020.3.1 Canary 11