-
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
QuarkusTestResource
with restrictToAnnotatedClass
inject for @Nested
classes
#26639
Labels
Milestone
Comments
@Sgitario do you want to take a look at this one? |
Sgitario
added a commit
to Sgitario/quarkus
that referenced
this issue
Jul 11, 2022
Sgitario
added a commit
to Sgitario/quarkus
that referenced
this issue
Jul 13, 2022
gsmet
pushed a commit
to gsmet/quarkus
that referenced
this issue
Jul 19, 2022
Fix quarkusio#26639 (cherry picked from commit ea838c6)
ia3andy
pushed a commit
to ia3andy/quarkus
that referenced
this issue
Jul 20, 2022
michelle-purcell
pushed a commit
to michelle-purcell/quarkus
that referenced
this issue
Jul 20, 2022
QuarkusTestResource
with restrictToAnnotatedClass
restarts for @Nested
classesQuarkusTestResource
with restrictToAnnotatedClass
inject for @Nested
classes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When
QuarkusTestResource
is configured to berestrictToAnnotatedClass
, it restarts for nested classes annotated with@Nested
. This is also the case forQuarkusTestResourceConfigurableLifecycleManager
, which applyrestrictToAnnotatedClass
automatically.Expected behavior
QuarkusTestResource
configured withrestrictToAnnotatedClass=true
should not restart for nested classes annotated with@Nested
.Or, should be capable of injecting fields into the parent class.
Actual behavior
QuarkusTestResource
configured withrestrictToAnnotatedClass=true
restarts for nested classes and can not inject fields located in the parent class.How to Reproduce?
Reproducer: reproducer.zip
How to reproduce: Execute the tests.
The reproducer introduces a
QuarkusTestResourceLifecycleManager
which injects the string "bar" using the@InjectDummyString
annotation.The
DummyNestedTest
shows, that the string is actuallynull
in a nested class annotated with@Nested
. Also you can see, that Quarkus is restarting for the nested class.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
2.10.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
The text was updated successfully, but these errors were encountered: