Skip to content

Selfie breaks with Kotest 6 #554

@polarene

Description

@polarene

When upgrading my test suite to Kotest 6, I found out it fails at runtime because there has been a breaking change (undocumented in their changelog) where a property has been renamed:

java.lang.NoSuchMethodError: 'java.lang.String io.kotest.core.names.TestName.getTestName()'
	at com.diffplug.selfie.junit5.SelfieExtension.intercept(SelfieExtension.kt:46)
	at io.kotest.engine.test.TestExtensions$intercept$execute$1$1.invoke(TestExtensions.kt:140)
	at io.kotest.engine.test.TestExtensions.intercept(TestExtensions.kt:148)
	at io.kotest.engine.test.interceptors.TestCaseExtensionInterceptor.intercept(TestCaseExtensionInterceptor.kt:21)
	at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt:119)
	at io.kotest.engine.test.interceptors.BeforeSpecListenerInterceptor.intercept(BeforeSpecListenerInterceptor.kt:42)
	at io.kotest.engine.test.TestCaseExecutor$execute$3$1.invoke(TestCaseExecutor.kt:119)
	at io.kotest.engine.test.interceptors.TestEnabledCheckInterceptor.intercept(TestEnabledCheckInterceptor.kt:39)

SelfieExtension has been compiled against Kotest 5.7.0, thus it fails at runtime.

I don't know what strategy could be effective to work around this problem, but currently I can't upgrade to Kotest 6 because I really like using Selfie and don't want to switch to another library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions