-
Notifications
You must be signed in to change notification settings - Fork 2
Description
QuarkusInstantiator
collects VaadinServiceInitListener
by:
- delegating to the
DefaultInstantiator
, that usesServiceLoader
- registering a listener that fires a CDI
ServiceInitEvent
event, to engage all observer methods
However, beans implementing VaadinServiceInitListener
are not considered.
Currently, this could be an issue in @QuarkusTest
, if you, for example, want to use a custom QuarkusTestProfile
to define a bean that does some initialization stuff, but for a couple of tests.
If you define a class with an @Observes
method, it will be invoked for all tests.
There are workaround (e.g. use @IfBuildProfile
annotation on the observer class, or define the method as @Observes(notifyObserver = Reception.IF_EXISTS)
and inject the bean into the test class to force the creation), but it would be easier if QuarkusInstantiator
also collects all beans implementing VaadinServiceInitListener
so that a developer could simply define the bean in the test profile.
Probably should only load VaadinServiceInitListener
beans having the @VaadinServiceEnabled
qualifier
Metadata
Metadata
Assignees
Labels
Type
Projects
Status