New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NoSuchMethodError io.kotest.core.descriptors.Descriptor$TestDescriptor.path(boolean) #3122
Comments
There was some issue solved by upgrading to coroutines 1.6.4. That may help.
…On Mon, Jul 25, 2022, 8:03 AM MrTomato ***@***.***> wrote:
After 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 Kotlin/kotlinx.coroutines#3345 (comment)
<Kotlin/kotlinx.coroutines#3345 (comment)>
but even if I remove it, I encounter the same error.
Any hints?
Cheers,
Maestro
—
Reply to this email directly, view it on GitHub
<#3122>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGRGECJPYB4DWXIZLCTVV2GB5ANCNFSM54SGXHOQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Hi Samuel, unfortunately that doesn't fix my issue. All other dependencies are on their latest version (renovate bot makes sure of that). That's why I encountered the error trying to update Kotest to the latest version 🥲 |
Same issue with Spring Boot 1.7.2 (which uses coroutine 1.6.4 AFAIK) and Kotlin 1.7.10 CXwudi/vocadb-video-downloader-new#25 |
I just encountered the same issue on the same upgrade @sksamuel |
Can I get a self contained project that fails ?
…On Wed, 27 Jul 2022 at 13:30, João Filipe Sabino Esperancinha < ***@***.***> wrote:
I just encountered the same issue on the same upgrade @sksamuel
<https://github.com/sksamuel>
—
Reply to this email directly, view it on GitHub
<#3122 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGWUBY67SGPX75LFYOTVWF52TANCNFSM54SGXHOQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Fixed in 5.4.1 |
Hmm... I still get the same error with kotest 5.4.1 and kotest-extensions-spring 1.1.1 🤔 |
Are you sure you're on 5.4.1 for all the right dependencies? |
Renovate updated to 5.4.1 but error is the same for us :/ |
Can you try adding |
Stays the same unfortunately :/
|
Well I'm stumped because this change fixed it for me.
Is it possible to get a single test class example project that fails?
…On Thu, 28 Jul 2022 at 06:47, Benjamin Otto ***@***.***> wrote:
Stays the same unfortunately :/
testImplementation("io.kotest:kotest-common:5.4.1")
—
Reply to this email directly, view it on GitHub
<#3122 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGVYXS27FA3V3VF5M5LVWJXOXANCNFSM54SGXHOQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
Thankyou @sksamuel ! I investigated this a bit, and noticed that if I build But from the latest publicly available
So my guess would be that there is something unreleased in the main branch of |
@timorantalaiho thanks for trying that. I think we can make this work for all versions - can you try the latest master build for the spring extension, and if you confirm that works, I will release 1.1.2 of the spring extension. |
@sksamuel Hmm is there a readily available build of latest https://github.com/kotest/kotest-extensions-spring somewhere? I used latest master from there ( |
yeah you can do that, or take the latest snapshot. |
Eg https://oss.sonatype.org/content/repositories/snapshots/io/kotest/extensions/kotest-extensions-spring/ |
Oh yes: using |
1.1.2 should be good for you then.
…On Thu, Jul 28, 2022, 7:57 AM Timo Rantalaiho ***@***.***> wrote:
Oh yes: using
io.kotest.extensions:kotest-extensions-spring:1.1.0.50-SNAPSHOT from the
Sonatype snapshots repo works too 👍
—
Reply to this email directly, view it on GitHub
<#3122 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFVSGTRO5CQNID5T6EEECDVWJ7TXANCNFSM54SGXHOQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Yes, it does the trick. Thankyou very much! |
yup, mine work now too - thanks @sksamuel! |
After 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:
Minimal class to reproduce:
where SpringStringSpec is defined as
I am using my workaround from Kotlin/kotlinx.coroutines#3345 (comment) but even if I remove it, I encounter the same error.
Any hints?
Cheers,
Maestro
The text was updated successfully, but these errors were encountered: