diff --git a/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/observer/ObserverTransformerTest.java b/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/observer/ObserverTransformerTest.java index 801babe116758..85d09bc5bc91d 100644 --- a/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/observer/ObserverTransformerTest.java +++ b/extensions/arc/deployment/src/test/java/io/quarkus/arc/test/observer/ObserverTransformerTest.java @@ -61,8 +61,10 @@ public boolean appliesTo(Type observedType, Set qualifiers) @Override public void transform(TransformationContext context) { - if (context.getMethod().name().equals("")) { - context.transform().removeAll().done(); + if (context.getMethod().name().equals("onMyEventRemoveQualifiers")) { + context.transform() + .remove(annotation -> annotation.name().equals(ALPHA_QUALIFIER)) + .done(); } } @@ -73,6 +75,8 @@ public void transform(TransformationContext context) { }; } + private static final DotName ALPHA_QUALIFIER = DotName.createSimple(AlphaQualifier.class); + @BravoQualifier @Inject Event event; @@ -89,7 +93,7 @@ public void testTransformation() { @Singleton static class MyObserver { - void onMyEventRemoveQualifiers(@Observes @BravoQualifier MyEvent event) { + void onMyEventRemoveQualifiers(@Observes @AlphaQualifier @BravoQualifier MyEvent event) { event.log.add("onMyEventRemoveQualifiers"); }