Skip to content
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

kotest-extensions-spring:1.1.1 doesn't work with kotest 5.4.0 #53

Closed
kochetkov-ma opened this issue Jul 28, 2022 · 2 comments
Closed

kotest-extensions-spring:1.1.1 doesn't work with kotest 5.4.0 #53

kochetkov-ma opened this issue Jul 28, 2022 · 2 comments

Comments

@kochetkov-ma
Copy link

kochetkov-ma commented Jul 28, 2022

build.gradle:

    testImplementation 'io.kotest:kotest-runner-junit5:5.4.0'
    testImplementation ('io.kotest.extensions:kotest-extensions-spring:1.1.1') {
        exclude group: 'io.kotest'
    }

kotlin 1.7.10

Trying to use Constructor Injection > have error

Caused by: 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)

So you try support deprecated package name via typealias - typealias TestPath = io.kotest.common.TestPath located /io/kotest/core/descriptors/descriptor.kt:9

But, it dosn't work =(

Apparently kotlin ignores typealias in the type returned in the method and you need to duplicate the method for backward compatibility and make a new version of Kotest or update Kotest in the Spring extension.

@Kantis
Copy link
Member

Kantis commented Jul 28, 2022

See kotest/kotest#3122

@Kantis Kantis closed this as completed Jul 28, 2022
@sksamuel
Copy link
Member

Fixed in 5.4.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants