-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Kotlin junit ParameterizedTest with functions as argument, not working anymore (Kotlin 2.0) #42000
Comments
/cc @geoand (kotlin) |
Ohhh, interesting. Do things work with Quarkus 3.12.x and Kotlin 2.0, @robp94? We did some changes in 3.13 relating to test classloading (#40601/ #40906), which could be causing this; but it's also quite possible that the old test classloading would be worse, and we need #34681 to make Kotlin 2.0 work. |
Quarkus 3.12.0 and kotlin 2.0 gives this error:
|
Thanks, @robp94. That's exactly the error I'd expect, pre-#40601. So we haven't made things worse for the Kotlin 2.0 case, we just haven't made them as much better as we'd hoped. I'm pretty sure the root cause is running tests in a different classloader from the one used to load them, but I'll confirm. Are you using the quarkus kotlin extension or just loose Kotlin? |
We use kotlin with the quarkus extension. The reproducer is based on code with quarkus with kotlin and rest. I think I did not change too much on project config. |
Describe the bug
We have some parameterized tests in kotlin with functions as argument, which do not work anymore with kotlin 2.0 and quarkus 3.13.0.CR1. Using kotlin 1.9.24 does still work.
This results in the following error:
Not sure if this is a quarkus, a junit or a kotlin problem. Maybe somebody could take a look?
As a workaround, if the function is defined like so it does work:
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
https://github.com/robp94/quarkus-kotlin-junit
Run the included test.
Output of
uname -a
orver
No response
Output of
java -version
21
Quarkus version or git rev
3.13.0.CR1
Build tool (ie. output of
mvnw --version
orgradlew --version
)maven
Additional information
No response
The text was updated successfully, but these errors were encountered: