-
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
QuarkusIntegrationTest fails with ClassCastException #20552
Comments
/cc @geoand |
Thanks for reporting. Can you attach a sample project that exhibits this behavior? Asking because I have personally never seen this... |
yeah, I understand. I think I know the reason.... I still think this is a bug : it's either should be possible to run both |
This is not possible because |
Sorry, I don't have the localized simple project for this. |
This is apparently possible because once I replaced Yes, I agree that surefire plugin should not be used to run ITs. So the config is kind of incorrect. Whatever, I identified a problem , it's up to you to decide what to do with this. I'm fine if it's closed since the configuration is initially wrong. |
We can certainly try to improve the error message to help users in the futrue. Thanks for the information! |
Hello, since this is exactly what we experienced now, I wanted to make some additions, so I hope it's ok to comment on the closed issue. Otherwise I could also open another issue, linking to this one. First of all we would like to run We tested this using Quarkus final SmallRyeConfig config = (SmallRyeConfig) ConfigProvider.getConfig(); I was wondering, why it is necessary there to cast it to With the previous version Thanks and best regards. |
it most certainly is :)
This is not possible.
What is the complete stacktrace? |
Thanks first of all for the quick answer!
It did work prior to 2.3.0.Final though. Was that a missing restriction in there? So It's not intended to run anything other than
The full stack trace (as visible in IntelliJ) is:
I can set up an example project later as well, if wanted. In general it's easy to trigger this e.g. from IntelliJ or maven, you just have to make sure that a |
If it worked, it worked by chance.
Correct |
Can we please have some sort of summary ❓ I'm asking since I'm following Kubernetes Native Microservices with Quarkus and MicroProfile book, and eventually I got into this issue as well (after overcoming another one when NativeImageTest instead of QuarkusIntegrationTest annotation was used). Just using If If
Which is abnormal anyway, as the native tests should run against the built image and not triggered before building it. Any feedback is appreciated. Thanks! |
|
Unbelievable! 🎉 It works! Really appreciated the quick feedback! @geoand 🙏 This naming convention should be clearly emphasized in the docs and guides. |
You are welcome!
It is mentioned in https://quarkus.io/guides/building-native-image, but feel free to open a PR if you feel there is an improvement to be made. |
Describe the bug
@QuarkusIntegrationTest
may fail with the following exceptionExpected behavior
No exception, test just work.
Actual behavior
The exception is thrown, test is failing.
How to Reproduce?
IT test annotated with @QuarkusTest works without any problems but it executes everything in the same JVM.
Once it changed to
@QuarkusIntegrationTest
sometimes it may throw this exception.Sometimes the test refuses to start Quarkus because the port is occupied (may be it has not been shutdown properly after the previous run ?)
Output of
uname -a
orver
Linux, version 4.14.225-169.362.amzn2.x86_64
Output of
java -version
Java 8
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.3.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
Upgraded Quarkus version to 2.3.0 where this fix is done : #20049
Now the tests are executed somehow but some tests are failing.
The text was updated successfully, but these errors were encountered: