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

Test execution fail on Intellij #32273

Closed
brunobat opened this issue Mar 30, 2023 · 14 comments
Closed

Test execution fail on Intellij #32273

brunobat opened this issue Mar 30, 2023 · 14 comments
Labels
area/testing kind/bug Something isn't working

Comments

@brunobat
Copy link
Contributor

brunobat commented Mar 30, 2023

Describe the bug

On a fully built and loaded Quarkus 3, with main, trying to run or debug tests with the IDE triggers this error:

quarkus/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/wrongannotations/BeanWithIncorrectInject.java:18:46
java: package org.gradle.internal.impldep.javax.inject does not exist

This annotation is not resolved:
@org.gradle.internal.impldep.javax.inject.Inject

Example test to trigger the issue:
io.quarkus.opentelemetry.deployment.OpenTelemetryHttpCDITest

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

Darwin ... 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64

Output of java -version

temurin-17.0.4.1

GraalVM version (if different from Java)

No response

Quarkus version or git rev

Quarkus main

Build tool (ie. output of mvnw --version or gradlew --version)

maven/3.8.7

Additional information

IntelliJ IDEA 2023.1 (Ultimate Edition)
Build #IU-231.8109.175, built on March 28, 2023

@brunobat brunobat added the kind/bug Something isn't working label Mar 30, 2023
@geoand
Copy link
Contributor

geoand commented Mar 31, 2023

Are you saying that IntelliJ can't run the tests of the Quarkus repo itself?

If so, that is unsurprising given the complexity of the project.

@brunobat
Copy link
Contributor Author

It was possible before and if you comment that annotation, all works.

@geoand
Copy link
Contributor

geoand commented Mar 31, 2023

I have personally never been able to run anything from the IDE on the Quarkus core repo.

@geoand
Copy link
Contributor

geoand commented Mar 31, 2023

@mkouba where does @org.gradle.internal.impldep.javax.inject.Inject in io.quarkus.arc.test.wrongannotations.BeanWithIncorrectInject come from?

@mkouba
Copy link
Contributor

mkouba commented Mar 31, 2023

@mkouba where does @org.gradle.internal.impldep.javax.inject.Inject in io.quarkus.arc.test.wrongannotations.BeanWithIncorrectInject come from?

It's bundled in the quarkus-bootstrap-gradle-resolver which is a dependency of quarkus-test-common.

@geoand
Copy link
Contributor

geoand commented Mar 31, 2023

Hm...

Maybe as trips up IDEs we can just use some custom annotation for the purposes of the test?

@mkouba
Copy link
Contributor

mkouba commented Mar 31, 2023

I have personally never been able to run anything from the IDE on the Quarkus core repo.

The same here.

Maybe as trips up IDEs we can just use some custom annotation for the purposes of the test?

We could just remove this annotation from the test. javax.inject.Inject and com.google.inject.Inject are the important ones that need to be tested explicitly.

@geoand
Copy link
Contributor

geoand commented Mar 31, 2023

@brunobat would you like to do a PR with ^?

Asking because we can't get the IDE to work anyway and you seem to be able to :)

@brunobat
Copy link
Contributor Author

Cool, will do

@brunobat
Copy link
Contributor Author

Curious... once I remove that annotation, the WrongInjectTest test fails:

org.opentest4j.AssertionFailedError: jakarta.enterprise.inject.spi.DeploymentException: Found 4 deployment problems: 
[1] @com.google.inject.Inject declared on io.quarkus.arc.test.wrongannotations.BeanWithIncorrectInject.bm1, use @jakarta.inject.Inject instead
[2] @javax.inject.Inject declared on io.quarkus.arc.test.wrongannotations.BeanWithIncorrectInject.bm2, use @jakarta.inject.Inject instead
[3] @javax.inject.Inject declared on io.quarkus.arc.test.wrongannotations.WrongInjectTest.beanManager, use @jakarta.inject.Inject instead
[4] @com.oracle.svm.core.annotate.Inject declared on io.quarkus.arc.test.wrongannotations.BeanWithIncorrectInject.bm3, use @jakarta.inject.Inject instead ==> 
Expected :true
Actual   :false

@mkouba
Copy link
Contributor

mkouba commented Mar 31, 2023

Curious... once I remove that annotation, the WrongInjectTest test fails:

org.opentest4j.AssertionFailedError: jakarta.enterprise.inject.spi.DeploymentException: Found 4 deployment problems: 
[1] @com.google.inject.Inject declared on io.quarkus.arc.test.wrongannotations.BeanWithIncorrectInject.bm1, use @jakarta.inject.Inject instead
[2] @javax.inject.Inject declared on io.quarkus.arc.test.wrongannotations.BeanWithIncorrectInject.bm2, use @jakarta.inject.Inject instead
[3] @javax.inject.Inject declared on io.quarkus.arc.test.wrongannotations.WrongInjectTest.beanManager, use @jakarta.inject.Inject instead
[4] @com.oracle.svm.core.annotate.Inject declared on io.quarkus.arc.test.wrongannotations.BeanWithIncorrectInject.bm3, use @jakarta.inject.Inject instead ==> 
Expected :true
Actual   :false

That's expected - you need to update the assertion as well.

@brunobat
Copy link
Contributor Author

yeah... didn't look deep enough

@geoand
Copy link
Contributor

geoand commented Apr 10, 2023

@brunobat can this be closed now?

@brunobat
Copy link
Contributor Author

Yes. It's fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants