NoSuchMethodError io.kotest.core.descriptors.Descriptor$TestDescriptor.path(boolean)
See original GitHub issueAfter upgrading from Kotest version 5.3.2 to 5.4.0 for dependencies io.kotest:kotest-runner-junit5-jvm and io.kotest:kotest-assertions-core-jvm (additionally using io.kotest.extensions:kotest-extensions-spring version 1.1.1 and spring-boot.starter.parent version 2.7.2) I get the following error Exception:
'io.kotest.core.descriptors.TestPath io.kotest.core.descriptors.Descriptor$TestDescriptor.path(boolean)'
java.lang.NoSuchMethodError: 'io.kotest.core.descriptors.TestPath io.kotest.core.descriptors.Descriptor$TestDescriptor.path(boolean)'
at io.kotest.extensions.spring.SpringTestExtension.methodName$kotest_extensions_spring(SpringTestExtension.kt:126)
at io.kotest.extensions.spring.SpringTestExtension.method(SpringTestExtension.kt:100)
at io.kotest.extensions.spring.SpringTestExtension.intercept(SpringTestExtension.kt:68)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1.invokeSuspend(TestExtensions.kt:146)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1.invoke(TestExtensions.kt)
at io.kotest.engine.test.TestExtensions$intercept$execute$1$1.invoke(TestExtensions.kt)
at io.kotest.engine.test.TestExtensions.intercept(TestExtensions.kt:154)
at io.kotest.engine.test.interceptors.TestCaseExtensionInterceptor.intercept(TestCaseExtensionInterceptor.kt:24)
at io.kotest.engine.test.TestCaseExecutor$execute$2$1.invokeSuspend(TestCaseExecutor.kt:90)
at io.kotest.engine.test.TestCaseExecutor$execute$2$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$2$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor$intercept$3.invokeSuspend(CoroutineErrorCollectorInterceptor.kt:28)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor$intercept$3.invoke(CoroutineErrorCollectorInterceptor.kt)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor$intercept$3.invoke(CoroutineErrorCollectorInterceptor.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at io.kotest.engine.test.interceptors.CoroutineErrorCollectorInterceptor.intercept(CoroutineErrorCollectorInterceptor.kt:27)
at io.kotest.engine.test.TestCaseExecutor$execute$2$1.invokeSuspend(TestCaseExecutor.kt:90)
at io.kotest.engine.test.TestCaseExecutor$execute$2$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.TestCaseExecutor$execute$2$1.invoke(TestCaseExecutor.kt)
at io.kotest.engine.test.interceptors.CoroutineDispatcherFactoryInterceptor$intercept$4.invokeSuspend(coroutineDispatcherFactoryInterceptor.kt:57)
at io.kotest.engine.test.interceptors.CoroutineDispatcherFactoryInterceptor$intercept$4.invoke(coroutineDispatcherFactoryInterceptor.kt)
at io.kotest.engine.test.interceptors.CoroutineDispatcherFactoryInterceptor$intercept$4.invoke(coroutineDispatcherFactoryInterceptor.kt)
at io.kotest.engine.concurrency.FixedThreadCoroutineDispatcherFactory$withDispatcher$4.invokeSuspend(FixedThreadCoroutineDispatcherFactory.kt:53)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Minimal class to reproduce:
package com.acme.foo
import org.assertj.core.api.Assertions.assertThat
import org.springframework.boot.test.context.SpringBootTest
@SpringBootTest(
webEnvironment = SpringBootTest.WebEnvironment.NONE,
)
class HealthCheckRemoteTest : SpringStringSpec() {
init {
"This is a fancy test" {
assertThat(true).isEqualTo(true)
}
}
}
where SpringStringSpec is defined as
package com.acme.foo
import io.kotest.core.extensions.Extension
import io.kotest.core.spec.style.StringSpec
import io.kotest.extensions.spring.SpringExtension
abstract class SpringStringSpec : StringSpec() {
override fun extensions(): List<Extension> = listOf(SpringExtension)
}
I am using my workaround from https://github.com/Kotlin/kotlinx.coroutines/issues/3345#event-6985037804 but even if I remove it, I encounter the same error.
Any hints?
Cheers, Maestro
Issue Analytics
- State:
- Created a year ago
- Reactions:6
- Comments:21 (10 by maintainers)
Top Results From Across the Web
Changelog - Kotest
Fix regression which causes NoSuchMethodError when using the Kotest Spring ... use ExperimentalKotest more broadly, it was moved from io.kotest.core.config.
Read more >Why IntelliJ Kotest plugin does not work well? - Stack Overflow
The test class compiles and the jar kotest-core-jvm-4.1.1.jar is included as external library. Can someone give some advice on this? kotlin ...
Read more >path - method of io.kotest.core.descriptors.SpecDescriptor class
Learn how to use path method in io.kotest.core.descriptors.SpecDescriptor for your next Kotest project with LambdaTest Automation Testing Advisor.
Read more >java.lang.NoSuchMethodError: org.testng.Assert.assertTrue
I'm receiving the following error below when I try to use assertTrue(boolean,String) If I use assertTrue(boolean) it will work. Any idea what the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
1.1.2 should be good for you then.
On Thu, Jul 28, 2022, 7:57 AM Timo Rantalaiho @.***> wrote:
yup, mine work now too - thanks @sksamuel!