-
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
ClassCastException: class io.quarkus.test.common.TestResourceManager cannot be cast to class io.quarkus.test.common.TestResourceManager #28526
Labels
Milestone
Comments
Good idea about providing a hint! #28537 takes care of it |
🙏 |
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Oct 13, 2022
…mixed Closes: quarkusio#28526 Co-authored-by: Falko Modler <[email protected]>
geoand
added a commit
to geoand/quarkus
that referenced
this issue
Oct 14, 2022
…mixed Closes: quarkusio#28526 Co-authored-by: Falko Modler <[email protected]>
geoand
added a commit
that referenced
this issue
Oct 18, 2022
Provide a hint for when @QuarkusTest and @QuarkusIntegrationTest are mixed
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Oct 18, 2022
…mixed Closes: quarkusio#28526 Co-authored-by: Falko Modler <[email protected]> (cherry picked from commit aeb4d75)
tmihalac
pushed a commit
to tmihalac/quarkus
that referenced
this issue
Oct 27, 2022
…mixed Closes: quarkusio#28526 Co-authored-by: Falko Modler <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Inadvertently mixing
@QuarkusTest
and@QuarkusIntegrationTest
by inadvertently naming convention of the classname, results in ClassCastExceptionExpected behavior
As allegedly is a known expectation not to mix it,
ref https://github.com/kiegroup/kogito-runtimes/pull/1757#discussion_r759158629
It would be ideal if a WARN message is produced even by heuristic, something ~like: "WARN It seems you are mixing
@QuarkusTest
and@QuarkusIntegrationTest
while running them with the Maven Failsafe plugin, and this might result in unexpected and unsupported behaviour"Actual behavior
For SEO purposes, might this help someone reach to this report and save some time by noticing they might have as well mixed Test Vs IT by means of mixing annotation / classname / filename
How to Reproduce?
checkout https://github.com/tarilabs/demo20221012-testit
mvn clean install
CCE is reproduced per stacktrace above.
Output of
uname -a
orver
No response
Output of
java -version
No response
GraalVM version (if different from Java)
No response
Quarkus version or git rev
No response
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
I would be happy to discuss how to potentially address this for DX, given it took me a while myself to figure out what was I doing wrong in my (more complex) application code.
The text was updated successfully, but these errors were encountered: